Add package versions to the rpm and deb filenames

This commit is contained in:
Mikrz 2024-11-11 16:36:27 -05:00
parent 1f3e3045ad
commit 992e8ee63b
No known key found for this signature in database
1 changed files with 7 additions and 6 deletions

View File

@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
VERSION=$(git describe --tags --always --match "[0-9][0-9][0-9][0-9].*.*") TAG_VERSION=$(git describe --tags --always --match "[0-9][0-9][0-9][0-9].*.*")
echo $VERSION OUT_VERSION=$(echo $TAG_VERSION | sed -E 's/([0-9]{4}\.[0-9]{1,2}\.[0-9]+-[0-9]+).*/\1/')
echo $TAG_VERSION
# Disable FIPS module in go-boring # Disable FIPS module in go-boring
export GOEXPERIMENT=noboringcrypto export GOEXPERIMENT=noboringcrypto
@ -29,10 +30,10 @@ for arch in ${linuxArchs[@]}; do
fi fi
make cloudflared-deb make cloudflared-deb
mv cloudflared\_$VERSION\_$arch.deb $ARTIFACT_DIR/cloudflared-linux-$arch.deb mv cloudflared\_$TAG_VERSION\_$arch.deb $ARTIFACT_DIR/cloudflared-$OUT_VERSION-linux-$arch.deb
# rpm packages invert the - and _ and use x86_64 instead of amd64. # rpm packages invert the - and _ and use x86_64 instead of amd64.
RPMVERSION=$(echo $VERSION|sed -r 's/-/_/g') RPMVERSION=$(echo $TAG_VERSION|sed -r 's/-/_/g')
RPMARCH=$arch RPMARCH=$arch
if [ $arch == "amd64" ];then if [ $arch == "amd64" ];then
RPMARCH="x86_64" RPMARCH="x86_64"
@ -41,8 +42,8 @@ for arch in ${linuxArchs[@]}; do
RPMARCH="aarch64" RPMARCH="aarch64"
fi fi
make cloudflared-rpm make cloudflared-rpm
mv cloudflared-$RPMVERSION-1.$RPMARCH.rpm $ARTIFACT_DIR/cloudflared-linux-$RPMARCH.rpm mv cloudflared-$RPMVERSION-1.$RPMARCH.rpm $ARTIFACT_DIR/cloudflared-$OUT_VERSION-linux-$RPMARCH.rpm
# finally move the linux binary as well. # finally move the linux binary as well.
mv ./cloudflared $ARTIFACT_DIR/cloudflared-linux-$arch mv ./cloudflared $ARTIFACT_DIR/cloudflared-$OUT_VERSION-linux-$arch
done done