lib: Add BASH_IT_DEVELOPMENT_BRANCH variable

This commit is contained in:
Noah Gorny
2020-07-17 16:36:57 +03:00
parent ecf65569ce
commit 8e6876719b
2 changed files with 8 additions and 1 deletions

View File

@@ -181,6 +181,9 @@ _bash-it_update-() {
if [ -z "$BASH_IT_REMOTE" ]; then
BASH_IT_REMOTE="origin"
fi
if [ -z "$BASH_IT_DEVELOPMENT_BRANCH" ]; then
BASH_IT_DEVELOPMENT_BRANCH="master"
fi
# Defaults to stable update
if [ -z "$1" ] || [ "$1" == "stable" ]; then
version="stable"
@@ -192,7 +195,7 @@ _bash-it_update-() {
fi
else
version="dev"
TARGET=${BASH_IT_REMOTE}/master
TARGET=${BASH_IT_REMOTE}/${BASH_IT_DEVELOPMENT_BRANCH}
fi
git fetch $BASH_IT_REMOTE --tags &> /dev/null