diff --git a/.zshrc b/.zshrc index f6df109..b8269ac 100644 --- a/.zshrc +++ b/.zshrc @@ -227,12 +227,14 @@ function git_release() { return 0 fi - if [[ $(\git rev-parse --abbrev-ref HEAD 2>/dev/null) != "master" ]] ; then + local defBranch=$(\git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@') + + if [[ $(\git rev-parse --abbrev-ref HEAD 2>/dev/null) != "$defBranch" ]] ; then if ! \git push ; then return 1 fi - if ! \git checkout master ; then + if ! \git checkout "$defBranch" ; then return 1 fi fi diff --git a/install.sh b/install.sh index 10b6466..d639ad9 100755 --- a/install.sh +++ b/install.sh @@ -7,7 +7,7 @@ set -e ################################################################################ -VERSION="2.4.6" +VERSION="2.4.7" ################################################################################