Skip to content

Commit

Permalink
Updated build script and gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
Niek committed May 30, 2019
1 parent 9faab46 commit c6ddca5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
x.pgm
y.pgm
output.mp4
build/
11 changes: 10 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
#!/bin/sh

if [ $# -ne 1 ]; then
echo "Usage: ./build.sh <version number>"
exit
fi

VERSION=$1

echo "Build packages with version number ${VERSION}"

platforms=("windows/amd64" "windows/386" "darwin/amd64" "linux/386" "linux/amd64")

for platform in "${platforms[@]}"
do
platform_split=(${platform//\// })
GOOS=${platform_split[0]}
GOARCH=${platform_split[1]}
output_name='build/superview-'$GOOS'-'$GOARCH
output_name='build/superview-'$GOOS'-'$GOARCH'-'$VERSION
if [ $GOOS = "windows" ]; then
output_name+='.exe'
fi
Expand Down

0 comments on commit c6ddca5

Please sign in to comment.