Skip to content

Commit

Permalink
Fix build script to get better file names
Browse files Browse the repository at this point in the history
  • Loading branch information
kytrinyx committed Sep 24, 2014
1 parent 4ee6afd commit 6834f6c
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions bin/build-all
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,24 @@ GOARCH=${1#*/}
echo "Creating $GOOS $GOARCH binary..."

GOOS=$GOOS GOARCH=$GOARCH "$(dirname $0)/build"

NAME=$GOOS
if [ $NAME == "darwin" ]; then
NAME="mac"
fi
ARCH="32bit"
if [ $GOARCH == "amd64" ]; then
ARCH="64bit"
fi

cd out
ls

if [ $GOOS == windows ]; then
mv $EXECUTABLE_NAME $EXECUTABLE_NAME.exe
tar cvzf ../release/$EXECUTABLE_NAME-$GOOS-$GOARCH.tgz $EXECUTABLE_NAME.exe
tar cvzf ../release/$EXECUTABLE_NAME-$NAME-$ARCH.tgz $EXECUTABLE_NAME.exe
else
tar cvzf ../release/$EXECUTABLE_NAME-$GOOS-$GOARCH.tgz $EXECUTABLE_NAME
tar cvzf ../release/$EXECUTABLE_NAME-$NAME-$ARCH.tgz $EXECUTABLE_NAME
fi

cd ..
Expand Down

0 comments on commit 6834f6c

Please sign in to comment.