File tree Expand file tree Collapse file tree 4 files changed +24
-21
lines changed Expand file tree Collapse file tree 4 files changed +24
-21
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -23,7 +23,10 @@ rpm-build: srpm-build
2323 cd ~ /rpmbuild/
2424 rpmbuild -bs
2525
26- template-deb :
26+ template-deb-setup :
27+ apt install curl jq -y
28+
29+ template-deb : template-deb-setup require-version
2730 RELEASE_JSON=" $$ (curl https://api.github.com/repos/scaleway/scaleway-cli/releases/tags/v${VERSION} )" ; \
2831 CHANGELOG=" $$ (echo $$ {RELEASE_JSON} | jq ." body" -r | grep '^*' | sed s/^\*/\ \ \*/g)" ; \
2932 DATE =$$(date -d "$$(echo $${RELEASE_JSON} | jq ."created_at" -r ) " -R ) ; \
@@ -32,13 +35,23 @@ template-deb:
3235 echo -e "\n -- Scaleway Devtools <opensource@scaleway.com> $${DATE}" >> specs/deb/changelog
3336
3437deb-setup :
35- apt install devscripts equivs jq -y
38+ apt install devscripts equivs -y
3639 ln -fs specs/deb debian
3740 mk-build-deps --install debian/control -t " apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y"
3841 go mod vendor
3942
40- deb-source-build : template-deb deb-setup
41- debuild -S -k524A68BAB1A91B2F74DCEC3B31F9FBCA5BD8707C
43+ deb-source-build : require-version template-deb deb-setup
44+ debuild -S -us -uc
45+
46+ deb-source-sign : require-version
47+ echo ' $(value GPG_PASSPHRASE)' > /tmp/key
48+ debsign -k524A68BAB1A91B2F74DCEC3B31F9FBCA5BD8707C --re-sign -p" gpg --pinentry-mode=loopback --passphrase-file /tmp/key" ../scw_${VERSION} .dsc ../scw_${VERSION} _source.changes
49+ rm /tmp/key
50+
51+ deb-source : deb-source-build deb-source-sign
52+
53+ deb-build :
54+ debuild -b -us -uc
4255
4356require-version :
4457ifndef VERSION
Original file line number Diff line number Diff line change @@ -10,3 +10,4 @@ Package: scw
1010Architecture: all
1111Description: Scaleway CLI
1212XS-Go-Import-Path: github.com/scaleway/scaleway-cli/v2/cmd/scw
13+ Version: ${VERSION}
Original file line number Diff line number Diff line change 33export DH_GOPKG := github.com/scaleway/scaleway-cli/v2
44export DH_GOLANG_BUILDPKG := ${DH_GOPKG}/cmd/scw
55
6+ VERSION := $(shell dpkg-parsechangelog -SVersion)
7+
68% :
79 dh $@ --builddirectory=_build
810
911override_dh_auto_install :
10- dh_auto_install -- --no-source
12+ dh_auto_install -- --no-source
13+
14+ override_dh_auto_build :
15+ dh_auto_build -- -ldflags " -w -extldflags -static -X main.Version=${VERSION} "
You can’t perform that action at this time.
0 commit comments