2021-03-07 15:23:44 +00:00
|
|
|
#!/bin/bash
|
2021-03-13 17:05:59 +00:00
|
|
|
# sets version environment variable for goreleaser to use
|
|
|
|
# scripts/version.sh goreleaser ...
|
2023-06-23 13:41:21 +00:00
|
|
|
|
2023-06-26 22:48:16 +00:00
|
|
|
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
|
2023-06-23 13:41:21 +00:00
|
|
|
|
2021-03-07 15:54:32 +00:00
|
|
|
JFA_GO_VERSION=$(git describe --exact-match HEAD 2> /dev/null || echo 'vgit')
|
2023-06-23 13:41:21 +00:00
|
|
|
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')" $@
|