Skip to content

Commit

Permalink
scripts/build-binary: fix darwin tar commands
Browse files Browse the repository at this point in the history
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
  • Loading branch information
gyuho committed Sep 28, 2019
1 parent 3a736a8 commit d08bb07
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/build-binary
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ function main {
cd release
setup_env "${PROJ}" "${VER}"

tarcmd=tar
if [[ $(go env GOOS) == "darwin" ]]; then
tarcmd=gtar
fi

for os in darwin windows linux; do
export GOOS=${os}
TARGET_ARCHS=("amd64")
Expand All @@ -78,7 +83,7 @@ function main {
package "${TARGET}" "${PROJ}"

if [ ${GOOS} == "linux" ]; then
tar cfz "${TARGET}.tar.gz" "${TARGET}"
${tarcmd} cfz "${TARGET}.tar.gz" "${TARGET}"
echo "Wrote release/${TARGET}.tar.gz"
else
zip -qr "${TARGET}.zip" "${TARGET}"
Expand Down

0 comments on commit d08bb07

Please sign in to comment.