outfly/doc/scripts/pack.sh

25 lines
538 B
Bash
Executable file

#!/bin/sh
# A script to package release binaries + README.md into zip files.
# Usage: cd outfly; doc/scripts/pack.sh
set -e
VERSION=0.4.0
TMPPATH=ZIP_TMP_PATH
mkdir "$TMPPATH"
cd "$TMPPATH"
SRCPATH="outfly_v$VERSION"
mkdir "$SRCPATH"
cp ../README.md "$SRCPATH"
cp ../target/x86_64-pc-windows-gnu/release/outfly.exe "$SRCPATH"
zip -v -r -9 ../"outfly_v${VERSION}_windows.zip" "$SRCPATH"
rm "$SRCPATH"/outfly.exe
cp ../target/release/outfly "$SRCPATH"
zip -v -r -9 ../"outfly_v${VERSION}_linux.zip" "$SRCPATH"
cd ..
rm -rf "$TMPPATH"