Skip to content
This repository was archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
Update build script
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrannosaurus-becks committed Jul 13, 2020
1 parent 1293948 commit acd29e6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions authenticator/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ DIR="$( cd -P "$( dirname "$SOURCE" )/.." && pwd )"
cd "$DIR"

# Set build tags
BUILD_TAGS="${BUILD_TAGS:-"approzium"}"
BUILD_TAGS="${BUILD_TAGS:-"authenticator"}"

# Get the git commit
GIT_COMMIT="$(git rev-parse HEAD)"
GIT_DIRTY="$(test -n "`git status --porcelain`" && echo "+CHANGES" || true)"

# If its dev mode, only build for ourself
if [ "${APPROZIUM_DEV_BUILD}x" != "x" ] && [ "${XC_OSARCH}x" == "x" ]; then
if [ "${AUTHENTICATOR_DEV_BUILD}x" != "x" ] && [ "${XC_OSARCH}x" == "x" ]; then
XC_OS=$(${GO_CMD} env GOOS)
XC_ARCH=$(${GO_CMD} env GOARCH)
XC_OSARCH=$(${GO_CMD} env GOOS)/$(${GO_CMD} env GOARCH)
Expand Down Expand Up @@ -55,7 +55,7 @@ gox \
-osarch="${XC_OSARCH}" \
-gcflags "${GCFLAGS}" \
-ldflags "${LD_FLAGS}-X github.com/cyralinc/approzium/sdk/version.GitCommit='${GIT_COMMIT}${GIT_DIRTY}'" \
-output "pkg/{{.OS}}_{{.Arch}}/approzium" \
-output "pkg/{{.OS}}_{{.Arch}}/authenticator" \
${GOX_PARALLEL_BUILDS+-parallel="${GOX_PARALLEL_BUILDS}"} \
-tags="${BUILD_TAGS}" \
-gocmd="${GO_CMD}" \
Expand All @@ -73,7 +73,7 @@ for F in $(find ${DEV_PLATFORM} -mindepth 1 -maxdepth 1 -type f); do
cp ${F} ${MAIN_GOPATH}/bin/
done

if [ "${APPROZIUM_DEV_BUILD}x" = "x" ]; then
if [ "${AUTHENTICATOR_DEV_BUILD}x" = "x" ]; then
# Zip and copy to the dist dir
echo "==> Packaging..."
for PLATFORM in $(find ./pkg -mindepth 1 -maxdepth 1 -type d); do
Expand Down

0 comments on commit acd29e6

Please sign in to comment.