fix src bundle

This commit is contained in:
Zack Scholl 2019-11-18 12:02:54 -08:00
parent 76fc3f1a77
commit c369f67745
1 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,8 @@
#!/bin/bash
tmp=$(mktemp -d)
VERSION=$(cat ./src/cli/cli.go | grep 'Version = "v' | sed 's/[^0-9.]*\([0-9.]*\).*/\1/')
echo $VERSION
git clone --depth 1 https://github.com/schollz/croc $tmp/croc
(cd $tmp/croc && go mod tidy && go mod vendor)
(cd $tmp && tar -cvzf croc-src.tar.gz croc)
mv $tmp/croc-src.tar.gz dist/
(cd $tmp && tar -cvzf croc_${VERSION}_src.tar.gz croc)
mv $tmp/croc_${VERSION}_src.tar.gz dist/