add debian packaging
rename builds to include the version
This commit is contained in:
parent
3c4cdf12a2
commit
262980c36e
4 changed files with 41 additions and 0 deletions
6
.fpm
Normal file
6
.fpm
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
-s dir
|
||||||
|
--name expiration-check
|
||||||
|
--license agpl3
|
||||||
|
--description "Checks the expiration dates of domains and certificates"
|
||||||
|
--url "https://gitnet.fr/deblan/expiration-check"
|
||||||
|
--maintainer "Simon Vieille <contact+expirationcheck@deblan.fr>"
|
||||||
|
|
@ -21,6 +21,15 @@ steps:
|
||||||
commands:
|
commands:
|
||||||
- make
|
- make
|
||||||
|
|
||||||
|
"Create packages":
|
||||||
|
image: deblan/fpm-packager
|
||||||
|
commands:
|
||||||
|
- VERSION=${CI_COMMIT_TAG/v//}
|
||||||
|
- ./bin/build-debs.sh "$VERSION"
|
||||||
|
- ./bin/rename-builds.sh "$VERSION"
|
||||||
|
when:
|
||||||
|
event: [tag]
|
||||||
|
|
||||||
"Publish":
|
"Publish":
|
||||||
image: plugins/gitea-release
|
image: plugins/gitea-release
|
||||||
settings:
|
settings:
|
||||||
|
|
|
||||||
9
bin/build-debs.sh
Executable file
9
bin/build-debs.sh
Executable file
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
VERSION="$1"
|
||||||
|
|
||||||
|
for ARCH in amd64 arm64; do
|
||||||
|
fpm -t deb -p "build/expiration-check-$VERSION-$ARCH.deb" \
|
||||||
|
--architecture $ARCH --version "$VERSION" \
|
||||||
|
"build/expiration-check-linux-$ARCH"=/usr/bin/expiration-check
|
||||||
|
done
|
||||||
17
bin/rename-builds.sh
Executable file
17
bin/rename-builds.sh
Executable file
|
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
VERSION="$1"
|
||||||
|
|
||||||
|
for OS in linux windows darwin; do
|
||||||
|
if [ "$OS" = "windows" ]; then
|
||||||
|
EXTENSION=".exe"
|
||||||
|
else
|
||||||
|
EXTENSION=
|
||||||
|
fi
|
||||||
|
|
||||||
|
for ARCH in amd64 arm64; do
|
||||||
|
mv -v \
|
||||||
|
"build/expiration-check-${OS}-${ARCH}${EXTENSION}" \
|
||||||
|
"build/expiration-check-${VERSION}-${OS}-${ARCH}${EXTENSION}"
|
||||||
|
done
|
||||||
|
done
|
||||||
Loading…
Add table
Add a link
Reference in a new issue