Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add package versions to the rpm and deb filenames #1357

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions build-packages.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash
VERSION=$(git describe --tags --always --match "[0-9][0-9][0-9][0-9].*.*")
echo $VERSION
TAG_VERSION=$(git describe --tags --always --match "[0-9][0-9][0-9][0-9].*.*")
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
export GOEXPERIMENT=noboringcrypto
Expand Down Expand Up @@ -29,10 +30,10 @@ for arch in ${linuxArchs[@]}; do
fi

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.
RPMVERSION=$(echo $VERSION|sed -r 's/-/_/g')
RPMVERSION=$(echo $TAG_VERSION|sed -r 's/-/_/g')
RPMARCH=$arch
if [ $arch == "amd64" ];then
RPMARCH="x86_64"
Expand All @@ -41,8 +42,8 @@ for arch in ${linuxArchs[@]}; do
RPMARCH="aarch64"
fi
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.
mv ./cloudflared $ARTIFACT_DIR/cloudflared-linux-$arch
mv ./cloudflared $ARTIFACT_DIR/cloudflared-$OUT_VERSION-linux-$arch
done