diff --git a/.gitignore b/.gitignore index a218b46..08b3a0b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ x.pgm y.pgm output.mp4 +build/ \ No newline at end of file diff --git a/build.sh b/build.sh index c43e63a..460c9f6 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,14 @@ #!/bin/sh +if [ $# -ne 1 ]; then + echo "Usage: ./build.sh " + 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[@]}" @@ -7,7 +16,7 @@ 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