summaryrefslogtreecommitdiffstats
path: root/create_tarball
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2016-03-05 15:43:06 +0100
committerSlávek Banko <[email protected]>2016-03-05 15:43:21 +0100
commit0e9786f3a5a81d5fd9616f348b8d777569224873 (patch)
treee4c0290877550331cdeb6bdbd3c9bb85aca13090 /create_tarball
parent2b30dcc138112114c8ab7360061ced33fc8f148f (diff)
downloadscripts-0e9786f3a5a81d5fd9616f348b8d777569224873.tar.gz
scripts-0e9786f3a5a81d5fd9616f348b8d777569224873.zip
Allow to create tarballs on detached branch
For example, for a particular git tag Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 2c769321341c07e85339cf60778cdb7d102f20b1)
Diffstat (limited to 'create_tarball')
-rwxr-xr-xcreate_tarball2
1 files changed, 1 insertions, 1 deletions
diff --git a/create_tarball b/create_tarball
index c97b828..cce38bf 100755
--- a/create_tarball
+++ b/create_tarball
@@ -27,7 +27,7 @@ if [[ ! -e .git ]] ||
fi
# Check remote branch
-branch=`git branch --contains HEAD | grep -v "no branch" | head -n1 | cut -c 3-`
+branch=`git branch --contains HEAD | egrep -v "no branch|detached" | head -n1 | cut -c 3-`
if [[ -z "$branch" ]] ||
[[ -z "`git rev-parse --symbolic-full-name --remotes=\"*/$branch\"`" ]]; then
echo "There is not active upstream branch. Exiting..."