From 1cdccfa884e7716b7c3f330ad92ead34dc8100ba Mon Sep 17 00:00:00 2001 From: Maxim Baz Date: Tue, 19 Nov 2019 19:38:29 +0100 Subject: [PATCH 1/2] Add version to the dir name in the source tarball --- src/install/prepare-sources-tarball.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/install/prepare-sources-tarball.sh b/src/install/prepare-sources-tarball.sh index c3d40e4..7d0e862 100755 --- a/src/install/prepare-sources-tarball.sh +++ b/src/install/prepare-sources-tarball.sh @@ -2,7 +2,7 @@ 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_${VERSION}_src.tar.gz croc) +git clone --depth 1 https://github.com/schollz/croc $tmp/croc-${VERSION} +(cd $tmp/croc-${VERSION} && go mod tidy && go mod vendor) +(cd $tmp && tar -cvzf croc_${VERSION}_src.tar.gz croc-${VERSION}) mv $tmp/croc_${VERSION}_src.tar.gz dist/ From cc6af6e5e80f2b6e737b1ec01faedf3a4573bb73 Mon Sep 17 00:00:00 2001 From: Maxim Baz Date: Tue, 19 Nov 2019 22:57:24 +0100 Subject: [PATCH 2/2] Checkout the version tag when cloning repo --- src/install/prepare-sources-tarball.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/install/prepare-sources-tarball.sh b/src/install/prepare-sources-tarball.sh index 7d0e862..bf3397a 100755 --- a/src/install/prepare-sources-tarball.sh +++ b/src/install/prepare-sources-tarball.sh @@ -2,7 +2,7 @@ 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-${VERSION} +git clone -b v${VERSION} --depth 1 https://github.com/schollz/croc $tmp/croc-${VERSION} (cd $tmp/croc-${VERSION} && go mod tidy && go mod vendor) (cd $tmp && tar -cvzf croc_${VERSION}_src.tar.gz croc-${VERSION}) mv $tmp/croc_${VERSION}_src.tar.gz dist/