Skip to content

Commit

Permalink
Updates to packaging script for new credential creator
Browse files Browse the repository at this point in the history
  • Loading branch information
adampresley committed May 29, 2018
1 parent 2b047ca commit fdbed3c
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion bin/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,33 +79,47 @@ cp ./create-mysql.sql ./deploy
#
# Compile for the various targets. Copy to the deploy folder
#
cd ../cmd/mailslurper

# OSX
if [ $TARGET = "osx" ]; then
cd ../cmd/mailslurper
env GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w"
mv ./mailslurper ../../bin/deploy

cd ../createcredentials
env GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w"
mv ./createcredentials ../../bin/deploy

cd ../../bin/deploy
zip -r -X $ZIPFILENAME *
cd ..
fi

# Linux
if [ $TARGET = "linux" ]; then
cd ../cmd/mailslurper
env GOOS=linux GOARCH=amd64 go build -ldflags="-s -w"
mv ./mailslurper ../../bin/deploy

cd ../createcredentials
env GOOS=linux GOARCH=amd64 go build -ldflags="-s -w"
mv ./createcredentials ../../bin/deploy

cd ../../bin/deploy
zip -r -X $ZIPFILENAME *
cd ..
fi

# Windows
if [ $TARGET = "windows" ]; then
cd ../cmd/mailslurper
env GOOS=windows GOARCH=amd64 go build -ldflags="-s -w"
mv ./mailslurper.exe ../../bin/deploy

cd ../createcredentials
env GOOS=windows GOARCH=amd64 go build -ldflags="-s -w"
mv ./createcredentials.exe ../../bin/deploy

cd ../../bin/deploy
zip -r -X $ZIPFILENAME *
cd ..
Expand All @@ -125,8 +139,16 @@ if [ -f "./deploy/mailslurper.exe" ]; then
rm ./deploy/mailslurper.exe
fi

if [ -f "./deploy/createcredentials.exe" ]; then
rm ./deploy/createcredentials.exe
fi

if [ -f "./deploy/mailsurper" ]; then
rm ./deploy/mailslurper
fi

if [ -f "./deploy/createcredentials" ]; then
rm ./deploy/createcredentials
fi

echo "Package complete."

0 comments on commit fdbed3c

Please sign in to comment.