mirror of
https://github.com/notherealmarco/coredns-deployment.git
synced 2025-05-05 20:42:33 +02:00
debian: get latest release from github (#24)
* debian: get latest release from github Use jq to parse result, barf with an error if something goes wrong. * typo
This commit is contained in:
parent
6eb4d654b8
commit
7a53c3e6de
3 changed files with 8 additions and 4 deletions
2
debian/control
vendored
2
debian/control
vendored
|
@ -1,6 +1,6 @@
|
||||||
Source: coredns
|
Source: coredns
|
||||||
Maintainer: Miek Gieben <miek@coredns.io>
|
Maintainer: Miek Gieben <miek@coredns.io>
|
||||||
Build-Depends: debhelper (>= 9), ca-certificates, wget, dh-systemd, lsb-release
|
Build-Depends: debhelper (>= 9), ca-certificates, curl, dh-systemd, lsb-release, jq
|
||||||
|
|
||||||
Package: coredns
|
Package: coredns
|
||||||
Architecture: any
|
Architecture: any
|
||||||
|
|
8
debian/rules
vendored
8
debian/rules
vendored
|
@ -1,6 +1,10 @@
|
||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
VERSION := 0.9.10
|
VERSION := $(shell curl -s https://api.github.com/repos/coredns/coredns/releases/latest | jq -r '.tag_name[1:length]')
|
||||||
|
# Github is ratelimiting this API pretty aggresively, error when not set.
|
||||||
|
ifeq ($(VERSION),null)
|
||||||
|
$(error No version found)
|
||||||
|
endif
|
||||||
|
|
||||||
DEB_HOST_ARCH := $(DEB_TARGET_ARCH)
|
DEB_HOST_ARCH := $(DEB_TARGET_ARCH)
|
||||||
DISTRIBUTION := $(shell lsb_release -sr)
|
DISTRIBUTION := $(shell lsb_release -sr)
|
||||||
|
@ -26,7 +30,7 @@ override_dh_auto_clean:
|
||||||
override_dh_auto_test:
|
override_dh_auto_test:
|
||||||
override_dh_auto_build:
|
override_dh_auto_build:
|
||||||
override_dh_auto_install:
|
override_dh_auto_install:
|
||||||
wget -N --progress=dot:mega $(URL)
|
curl -L $(URL) -o $(TARBALL)
|
||||||
mkdir -p debian/coredns/usr/bin debian/coredns/etc/coredns
|
mkdir -p debian/coredns/usr/bin debian/coredns/etc/coredns
|
||||||
tar -xf $(TARBALL) -C debian/coredns/usr/bin
|
tar -xf $(TARBALL) -C debian/coredns/usr/bin
|
||||||
cp debian/Corefile debian/coredns/etc/coredns/Corefile
|
cp debian/Corefile debian/coredns/etc/coredns/Corefile
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue