mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +00:00
This reverts commit 79cd6047dc
.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
# This script builds a single Go binary of Coder with the given parameters.
|
||||
#
|
||||
# Usage: ./build_go.sh [--version 1.2.3-devel+abcdef] [--os linux] [--arch amd64] [--output path/to/output] [--slim] [--agpl] [--boringcrypto]
|
||||
# Usage: ./build_go.sh [--version 1.2.3-devel+abcdef] [--os linux] [--arch amd64] [--output path/to/output] [--slim] [--agpl]
|
||||
#
|
||||
# Defaults to linux:amd64 with slim disabled, but can be controlled with GOOS,
|
||||
# GOARCH and CODER_SLIM_BUILD=1. If no version is specified, defaults to the
|
||||
@ -22,9 +22,6 @@
|
||||
#
|
||||
# If the --agpl parameter is specified, builds only the AGPL-licensed code (no
|
||||
# Coder enterprise features).
|
||||
#
|
||||
# If the --boringcrypto parameter is specified, builds use boringcrypto instead of
|
||||
# the standard go crypto libraries.
|
||||
|
||||
set -euo pipefail
|
||||
# shellcheck source=scripts/lib.sh
|
||||
@ -37,9 +34,8 @@ slim="${CODER_SLIM_BUILD:-0}"
|
||||
sign_darwin="${CODER_SIGN_DARWIN:-0}"
|
||||
output_path=""
|
||||
agpl="${CODER_BUILD_AGPL:-0}"
|
||||
boringcrypto=${CODER_BUILD_BORINGCRYPTO:-0}
|
||||
|
||||
args="$(getopt -o "" -l version:,os:,arch:,output:,slim,agpl,sign-darwin,boringcrypto -- "$@")"
|
||||
args="$(getopt -o "" -l version:,os:,arch:,output:,slim,agpl,sign-darwin -- "$@")"
|
||||
eval set -- "$args"
|
||||
while true; do
|
||||
case "$1" in
|
||||
@ -72,10 +68,6 @@ while true; do
|
||||
sign_darwin=1
|
||||
shift
|
||||
;;
|
||||
--boringcrypto)
|
||||
boringcrypto=1
|
||||
shift
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
break
|
||||
@ -148,15 +140,7 @@ cmd_path="./enterprise/cmd/coder"
|
||||
if [[ "$agpl" == 1 ]]; then
|
||||
cmd_path="./cmd/coder"
|
||||
fi
|
||||
|
||||
cgo=0
|
||||
goexp=""
|
||||
if [[ "$boringcrypto" == 1 ]]; then
|
||||
cgo=1
|
||||
goexp="boringcrypto"
|
||||
fi
|
||||
|
||||
GOEXPERIMENT="$goexp" CGO_ENABLED="$cgo" GOOS="$os" GOARCH="$arch" GOARM="$arm_version" go build \
|
||||
CGO_ENABLED=0 GOOS="$os" GOARCH="$arch" GOARM="$arm_version" go build \
|
||||
"${build_args[@]}" \
|
||||
"$cmd_path" 1>&2
|
||||
|
||||
|
Reference in New Issue
Block a user