fix releasing executables for windows

This commit is contained in:
rhysd 2017-12-30 14:18:51 +09:00
parent dd5ef80683
commit 51a5df79bb
1 changed files with 7 additions and 2 deletions

View File

@ -7,14 +7,19 @@ if [ ! -d .git ]; then
exit 1
fi
command=selfupdate-example
executable=selfupdate-example
rm -rf release
gox -verbose ./cmd/$command
gox -verbose ./cmd/$executable
mkdir -p release
mv selfupdate-example_* release/
cd release
for bin in *; do
if [[ "$bin" == *windows* ]]; then
command="${executable}.exe"
else
command="$executable"
fi
mv "$bin" "$command"
zip "${bin}.zip" "$command"
rm "$command"