mirror of
https://github.com/notherealmarco/coredns-deployment.git
synced 2025-03-14 14:16:16 +01: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
Makefile
2
Makefile
|
@ -3,7 +3,7 @@
|
|||
# Build the debian packages
|
||||
.PHONY: debian
|
||||
debian:
|
||||
dpkg-buildpackage -us -uc -b --target-arch amd64
|
||||
dpkg-buildpackage -us -uc -b --target-arch amd64
|
||||
dpkg-buildpackage -us -uc -b --target-arch armhf
|
||||
dpkg-buildpackage -us -uc -b --target-arch arm64
|
||||
# debs are one up
|
||||
|
|
2
debian/control
vendored
2
debian/control
vendored
|
@ -1,6 +1,6 @@
|
|||
Source: coredns
|
||||
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
|
||||
Architecture: any
|
||||
|
|
8
debian/rules
vendored
8
debian/rules
vendored
|
@ -1,6 +1,10 @@
|
|||
#!/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)
|
||||
DISTRIBUTION := $(shell lsb_release -sr)
|
||||
|
@ -26,7 +30,7 @@ override_dh_auto_clean:
|
|||
override_dh_auto_test:
|
||||
override_dh_auto_build:
|
||||
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
|
||||
tar -xf $(TARBALL) -C debian/coredns/usr/bin
|
||||
cp debian/Corefile debian/coredns/etc/coredns/Corefile
|
||||
|
|
Loading…
Reference in a new issue