cloudflare/cloudflared

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
2024.4.1

Branches

Tags

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

Clone

HTTPS

Download ZIP

build-packages-fips.sh

26lines · modecode

1#!/bin/bash
2VERSION=$(git describe --tags --always --match "[0-9][0-9][0-9][0-9].*.*")
3echo $VERSION
4
5# This controls the directory the built artifacts go into
6export ARTIFACT_DIR=built_artifacts/
7mkdir -p $ARTIFACT_DIR
8
9arch=("amd64")
10export TARGET_ARCH=$arch
11export TARGET_OS=linux
12export FIPS=true
13# For BoringCrypto to link, we need CGO enabled. Otherwise compilation fails.
14export CGO_ENABLED=1
15
16make cloudflared-deb
17mv cloudflared-fips\_$VERSION\_$arch.deb $ARTIFACT_DIR/cloudflared-fips-linux-$arch.deb
18
19# rpm packages invert the - and _ and use x86_64 instead of amd64.
20RPMVERSION=$(echo $VERSION|sed -r 's/-/_/g')
21RPMARCH="x86_64"
22make cloudflared-rpm
23mv cloudflared-fips-$RPMVERSION-1.$RPMARCH.rpm $ARTIFACT_DIR/cloudflared-fips-linux-$RPMARCH.rpm
24
25# finally move the linux binary as well.
26mv ./cloudflared $ARTIFACT_DIR/cloudflared-fips-linux-$arch