mirror of https://github.com/schollz/croc.git
Merge pull request #176 from maximbaz/patch-2
Add version to the dir name in the source tarball
This commit is contained in:
commit
0e555179f8
|
@ -2,7 +2,7 @@
|
||||||
tmp=$(mktemp -d)
|
tmp=$(mktemp -d)
|
||||||
VERSION=$(cat ./src/cli/cli.go | grep 'Version = "v' | sed 's/[^0-9.]*\([0-9.]*\).*/\1/')
|
VERSION=$(cat ./src/cli/cli.go | grep 'Version = "v' | sed 's/[^0-9.]*\([0-9.]*\).*/\1/')
|
||||||
echo $VERSION
|
echo $VERSION
|
||||||
git clone --depth 1 https://github.com/schollz/croc $tmp/croc
|
git clone -b v${VERSION} --depth 1 https://github.com/schollz/croc $tmp/croc-${VERSION}
|
||||||
(cd $tmp/croc && go mod tidy && go mod vendor)
|
(cd $tmp/croc-${VERSION} && go mod tidy && go mod vendor)
|
||||||
(cd $tmp && tar -cvzf croc_${VERSION}_src.tar.gz croc)
|
(cd $tmp && tar -cvzf croc_${VERSION}_src.tar.gz croc-${VERSION})
|
||||||
mv $tmp/croc_${VERSION}_src.tar.gz dist/
|
mv $tmp/croc_${VERSION}_src.tar.gz dist/
|
||||||
|
|
Loading…
Reference in New Issue