mirror of
https://github.com/NohamR/papeer.git
synced 2026-05-25 04:17:19 +00:00
better display, release script
This commit is contained in:
21
release.sh
Executable file
21
release.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
version=$1
|
||||
platforms=("linux/amd64" "darwin/amd64" "windows/amd64")
|
||||
|
||||
for platform in "${platforms[@]}"
|
||||
do
|
||||
platform_split=(${platform//\// })
|
||||
GOOS=${platform_split[0]}
|
||||
GOARCH=${platform_split[1]}
|
||||
output_name='papeer-'$version'-'$GOOS'-'$GOARCH
|
||||
if [ $GOOS = "windows" ]; then
|
||||
output_name+='.exe'
|
||||
fi
|
||||
|
||||
env GOOS=$GOOS GOARCH=$GOARCH go build -o $output_name
|
||||
if [ $? -ne 0 ]; then
|
||||
echo 'An error has occurred! Aborting the script execution...'
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user