-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,22 @@ rpm-build: srpm-build | |
cd ~/rpmbuild/ | ||
rpmbuild -bs | ||
|
||
template-deb: | ||
RELEASE_JSON="$$(curl https://api.github.com/repos/scaleway/scaleway-cli/releases/tags/v${VERSION})"; \ | ||
CHANGELOG="$$(echo $${RELEASE_JSON} | jq ."body" -r | grep '^*' | sed s/^\*/\ \ \*/g)"; \ | ||
DATE=$$(date -d "$$(echo $${RELEASE_JSON} | jq ."created_at" -r)" -R) ; \ | ||
echo -e "scw (${VERSION}) focal; urgency=medium\n" > specs/deb/changelog; \ | ||
echo "$${CHANGELOG}" >> specs/deb/changelog; \ | ||
echo -e "\n -- Scaleway Devtools <[email protected]> $${DATE}" >> specs/deb/changelog | ||
|
||
deb-setup: | ||
apt install devscripts equivs jq -y | ||
mk-build-deps --install debian/control | ||
go mod vendor | ||
|
||
deb-source-build: deb-setup template-deb | ||
debuild -S -k524A68BAB1A91B2F74DCEC3B31F9FBCA5BD8707C | ||
|
||
require-version: | ||
ifndef VERSION | ||
$(error VERSION is undefined) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
## File should be updated by |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Source: scw | ||
Homepage: https://www.scaleway.com/ | ||
Maintainer: Scaleway Devtools <[email protected]> | ||
Rules-Requires-Root: no | ||
Build-Depends: debhelper-compat (= 13), | ||
dh-golang, | ||
golang-any, | ||
|
||
Package: scw | ||
Architecture: all | ||
Description: Scaleway CLI | ||
XS-Go-Import-Path: github.com/scaleway/scaleway-cli/v2/cmd/scw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/make -f | ||
|
||
export DH_GOPKG := github.com/scaleway/scaleway-cli/v2 | ||
export DH_GOLANG_BUILDPKG := ${DH_GOPKG}/cmd/scw | ||
|
||
%: | ||
dh $@ --builddirectory=_build | ||
|
||
override_dh_auto_install: | ||
dh_auto_install -- --no-source |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
scaleway-cli.spec |