add debian packaging

rename builds to include the version
This commit is contained in:
Simon Vieille 2024-07-24 11:38:33 +02:00
commit 262980c36e
Signed by: deblan
GPG key ID: 579388D585F70417
4 changed files with 41 additions and 0 deletions

9
bin/build-debs.sh Executable file
View 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
View 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