2021-07-30 11:29:51 +00:00
|
|
|
VERSION=$(git describe --tags --always --dirty="-dev" --match "[0-9][0-9][0-9][0-9].*.*")
|
|
|
|
echo $VERSION
|
2021-07-28 09:08:20 +00:00
|
|
|
export CGO_ENABLED=0
|
2021-07-22 15:36:49 +00:00
|
|
|
# This controls the directory the built artifacts go into
|
|
|
|
export ARTIFACT_DIR=built_artifacts/
|
|
|
|
mkdir -p $ARTIFACT_DIR
|
|
|
|
windowsArchs=("amd64" "386")
|
|
|
|
export TARGET_OS=windows
|
2021-12-16 00:26:05 +00:00
|
|
|
for arch in ${windowsArchs[@]}; do
|
2021-07-22 15:36:49 +00:00
|
|
|
export TARGET_ARCH=$arch
|
|
|
|
make cloudflared-msi
|
2021-07-30 11:29:51 +00:00
|
|
|
mv ./cloudflared.exe $ARTIFACT_DIR/cloudflared-windows-$arch.exe
|
|
|
|
mv cloudflared-$VERSION-$arch.msi $ARTIFACT_DIR/cloudflared-windows-$arch.msi
|
2021-07-22 15:36:49 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
|
2021-12-16 00:26:05 +00:00
|
|
|
export FIPS=true
|
|
|
|
linuxArchs=("amd64" "386" "arm" "arm64")
|
2021-07-22 15:36:49 +00:00
|
|
|
export TARGET_OS=linux
|
2021-12-16 00:26:05 +00:00
|
|
|
for arch in ${linuxArchs[@]}; do
|
2021-07-22 15:36:49 +00:00
|
|
|
export TARGET_ARCH=$arch
|
|
|
|
make cloudflared-deb
|
2021-07-30 11:29:51 +00:00
|
|
|
mv cloudflared\_$VERSION\_$arch.deb $ARTIFACT_DIR/cloudflared-linux-$arch.deb
|
|
|
|
|
2021-12-16 00:26:05 +00:00
|
|
|
# rpm packages invert the - and _ and use x86_64 instead of amd64.
|
2021-07-30 11:29:51 +00:00
|
|
|
RPMVERSION=$(echo $VERSION|sed -r 's/-/_/g')
|
|
|
|
RPMARCH=$arch
|
|
|
|
if [ $arch == "amd64" ];then
|
|
|
|
RPMARCH="x86_64"
|
|
|
|
fi
|
2021-08-04 07:18:43 +00:00
|
|
|
if [ $arch == "arm64" ]; then
|
|
|
|
RPMARCH="aarch64"
|
|
|
|
fi
|
2021-07-22 15:36:49 +00:00
|
|
|
make cloudflared-rpm
|
2021-07-30 11:29:51 +00:00
|
|
|
mv cloudflared-$RPMVERSION-1.$RPMARCH.rpm $ARTIFACT_DIR/cloudflared-linux-$RPMARCH.rpm
|
|
|
|
|
|
|
|
# finally move the linux binary as well.
|
|
|
|
mv ./cloudflared $ARTIFACT_DIR/cloudflared-linux-$arch
|
2021-07-22 15:36:49 +00:00
|
|
|
done
|
2021-12-16 00:26:05 +00:00
|
|
|
|