Skip to content

Commit

Permalink
add packaging script
Browse files Browse the repository at this point in the history
  • Loading branch information
shenwei356 committed May 29, 2024
1 parent 579846d commit b9e0710
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
t.*

wfa-go
benchmark/benchmark
benchmark/benchmark
benchmark/binaries
20 changes: 20 additions & 0 deletions benchmark/packaging.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env sh

CGO_ENABLED=0 gox -os="windows darwin linux" -arch="amd64 arm64" -tags netgo -ldflags '-w -s' -asmflags '-trimpath' \
-output "wfa-go_{{.OS}}_{{.Arch}}"

dir=binaries
mkdir -p $dir;
rm -rf $dir/$f;

for f in wfa-go_*; do
mkdir -p $dir/$f;
mv $f $dir/$f;
cd $dir/$f;
mv $f $(echo $f | perl -pe 's/_[^\.]+//g');
tar -zcf $f.tar.gz wfa-go*;
mv *.tar.gz ../;
cd ..;
rm -rf $f;
cd ..;
done;

0 comments on commit b9e0710

Please sign in to comment.