1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-11-13 22:00:10 +00:00
jfa-go/scripts/version.sh
Harvey Tindall a4d436b16b
build: increase goreleaser build timeout
CI server is quite slow, so the 30m timeout of goreleaser was being
exceeded. Bumped to 60m, as defined by "TIMEOUT" in version.sh.
2024-07-21 14:29:35 +01:00

22 lines
791 B
Bash
Executable File

#!/bin/bash
# sets version environment variable for goreleaser to use
# scripts/version.sh goreleaser ...
if [[ -z "${JFA_GO_SNAPSHOT}" ]]; then
export JFA_GO_SOURCEMAP=""
export JFA_GO_COPYTS="echo skipping sourcemaps"
export JFA_GO_STRIP=""
export JFA_GO_MINIFY="--minify"
else
echo "SNAPSHOT"
export JFA_GO_SOURCEMAP="--sourcemap"
export JFA_GO_COPYTS="cp -r tempts data/web/js/ts"
export JFA_GO_STRIP="-s -w"
export JFA_GO_MINIFY=""
fi
JFA_GO_VERSION=$(git describe --exact-match HEAD 2> /dev/null || echo 'vgit')
TIMEOUT=60m
JFA_GO_CSS_VERSION="v3" JFA_GO_NFPM_EPOCH=$(git rev-list --all --count) JFA_GO_BUILD_TIME=$(date +%s) JFA_GO_BUILT_BY=${JFA_GO_BUILT_BY:-"???"} JFA_GO_VERSION="$(echo $JFA_GO_VERSION | sed 's/v//g')" $@ --timeout $TIMEOUT