summaryrefslogtreecommitdiffstats
path: root/create_tarball
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2016-03-05 15:43:06 +0100
committerSlávek Banko <slavek.banko@axis.cz>2016-03-05 15:43:37 +0100
commit7742941f74f644567a812c25cba7a5e94cb16b25 (patch)
tree583202998983a9ae304936fff8f4bb4f534734ce /create_tarball
parent34be6b5ed4ccb1101c25d04944d7062c433c17e9 (diff)
downloadscripts-7742941f74f644567a812c25cba7a5e94cb16b25.tar.gz
scripts-7742941f74f644567a812c25cba7a5e94cb16b25.zip
Allow to create tarballs on detached branch
For example, for a particular git tag Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (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 ad2ae61..07336b7 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..."