Allow to create tarballs on detached branch

For example, for a particular git tag

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 9 years ago
parent 980d8ea3f8
commit 2c76932134

@ -39,7 +39,7 @@ if [[ ! -e .git ]] ||
fi fi
# Check remote branch # 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" ]] || if [[ -z "$branch" ]] ||
[[ -z "`git rev-parse --symbolic-full-name --remotes=\"*/$branch\"`" ]]; then [[ -z "`git rev-parse --symbolic-full-name --remotes=\"*/$branch\"`" ]]; then
echo "There is not active upstream branch. Exiting..." echo "There is not active upstream branch. Exiting..."

@ -27,7 +27,7 @@ if [[ ! -e .git ]] ||
fi fi
# Check remote branch # 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" ]] || if [[ -z "$branch" ]] ||
[[ -z "`git rev-parse --symbolic-full-name --remotes=\"*/$branch\"`" ]]; then [[ -z "`git rev-parse --symbolic-full-name --remotes=\"*/$branch\"`" ]]; then
echo "There is not active upstream branch. Exiting..." echo "There is not active upstream branch. Exiting..."

Loading…
Cancel
Save