Skip to content

Commit

Permalink
add basic release.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
semilin committed Jun 6, 2024
1 parent d182c7d commit 7b5bdc1
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ genkey
genkey.exe
text.txt
heatmap.png
release.sh
cpu.prof
genkey.test
mem.prof
Expand Down
34 changes: 34 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/sh
if [ $# -eq 0 ]
then
echo "No version given"
exit
fi

version=$1
mkdir -p $version/windows
mkdir -p $version/mac
mkdir -p $version/linux
filelist="README.md LICENSE corpora/ layouts/ config.toml"

rm genkey
rm genkey.exe
echo "Building Windows"
GOOS=windows GOARCH=amd64 go build
cp -r $filelist genkey.exe $version/windows/

echo "Building MacOS"
GOOS=darwin GOARCH=amd64 go build
cp -r $filelist genkey $version/mac/

echo "Building Linux"
GOOS=linux GOARCH=amd64 go build
cp -r $filelist genkey $version/linux/

cd $version
echo "Compressing Windows"
zip windows.zip -r windows
echo "Compressing MacOS"
zip mac.zip -r mac
echo "Compressing Linux"
tar cf linux.tar.gz linux

0 comments on commit 7b5bdc1

Please sign in to comment.