cloudflare/cloudflared

Public

mirrored from https://github.com/cloudflare/cloudflaredAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
cd4af5696d0db81caae903b33e4bbddfb5aff9ff

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

build-packages.sh

37lines · modecode

1VERSION=$(git describe --tags --always --dirty="-dev" --match "[0-9][0-9][0-9][0-9].*.*")
2echo $VERSION
3export CGO_ENABLED=0
4# This controls the directory the built artifacts go into
5export ARTIFACT_DIR=built_artifacts/
6mkdir -p $ARTIFACT_DIR
7windowsArchs=("amd64" "386")
8export TARGET_OS=windows
9for arch in ${windowsArchs[@]}; do
10 export TARGET_ARCH=$arch
11 make cloudflared-msi
12 mv ./cloudflared.exe $ARTIFACT_DIR/cloudflared-windows-$arch.exe
13 mv cloudflared-$VERSION-$arch.msi $ARTIFACT_DIR/cloudflared-windows-$arch.msi
14done
15
16
17export FIPS=true
18linuxArchs=("amd64" "386" "arm")
19export TARGET_OS=linux
20for arch in ${linuxArchs[@]}; do
21 export TARGET_ARCH=$arch
22 make cloudflared-deb
23 mv cloudflared\_$VERSION\_$arch.deb $ARTIFACT_DIR/cloudflared-linux-$arch.deb
24
25 # rpm packages invert the - and _ and use x86_64 instead of amd64.
26 RPMVERSION=$(echo $VERSION|sed -r 's/-/_/g')
27 RPMARCH=$arch
28 if [ $arch == "amd64" ];then
29 RPMARCH="x86_64"
30 fi
31 make cloudflared-rpm
32 mv cloudflared-$RPMVERSION-1.$RPMARCH.rpm $ARTIFACT_DIR/cloudflared-linux-$RPMARCH.rpm
33
34 # finally move the linux binary as well.
35 mv ./cloudflared $ARTIFACT_DIR/cloudflared-linux-$arch
36done
37
38