mirror of https://github.com/zulip/zulip.git
deploy-branch: Check out original ref by name if possible
(imported from commit eefc68574f1d1a94f1284670df18f59ef2aa1aa5)
This commit is contained in:
parent
4502e563d1
commit
878646542f
|
@ -19,7 +19,12 @@ branch_ref=$(git rev-list --max-count=1 $branch)
|
||||||
if [ "$old_ref" == "$branch_ref" ]; then
|
if [ "$old_ref" == "$branch_ref" ]; then
|
||||||
new_ref=master
|
new_ref=master
|
||||||
else
|
else
|
||||||
new_ref=$old_ref
|
ref_name=$(git describe --all --exact $old_ref)
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
new_ref=$(echo $ref_name | perl -pe 's{^(heads|remotes)/}{}')
|
||||||
|
else
|
||||||
|
new_ref=$old_ref
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -z "$branch" ] && error_out "You must specify a branch name to deploy"
|
[ -z "$branch" ] && error_out "You must specify a branch name to deploy"
|
||||||
|
|
Loading…
Reference in New Issue