Skip to content

Commit

Permalink
Fixes error in build script.
Browse files Browse the repository at this point in the history
  • Loading branch information
mspalti committed Apr 18, 2022
1 parent fa5e452 commit 3a387a0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/build_distros.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#!/bin/bash

PLATFORMS="darwin/amd64"
Expand All @@ -16,9 +15,11 @@ type setopt >/dev/null 2>&1
SCRIPT_NAME=`basename "$0"`
FAILURES=""
PREFIX="processor"
BIN_PATH="bin"
BIN_PATH="./bin"
DISTROS="assets/build"

rm -rf "${BIN_PATH:?}/"*

for PLATFORM in $PLATFORMS; do
GOOS=${PLATFORM%/*}
GOARCH=${PLATFORM#*/}
Expand All @@ -29,7 +30,7 @@ for PLATFORM in $PLATFORMS; do
if [[ "${GOOS}" == "windows" ]]; then BIN_FILENAME="${BIN_FILENAME}.exe"; fi
CMD="GOOS=${GOOS} GOARCH=${GOARCH} go build -o ${BIN_PATH}/${OUTPUT_DIR}/${BIN_FILENAME} main.go
&& cp -n ${DISTROS}/config.yml ${BIN_PATH}/${OUTPUT_DIR}/
&& tar -cf ${BIN_PATH}/${OUTPUT_DIR}.tar ${BIN_PATH}/${OUTPUT_DIR}/${BIN_FILENAME}"
&& tar -czf ${BIN_PATH}/${OUTPUT_DIR}.tar.gz ${BIN_PATH}/${OUTPUT_DIR}"
echo "${CMD}"
eval $CMD || FAILURES="${FAILURES} ${PLATFORM}"
done
Expand Down

0 comments on commit 3a387a0

Please sign in to comment.