Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e12a220 authored by Amit Kumar's avatar Amit Kumar 💻
Browse files

Modify version upgrade script

parent f1e211ac
Loading
Loading
Loading
Loading
+5 −10
Original line number Diff line number Diff line
@@ -144,15 +144,10 @@ do_version_upgrade() {
}

# It must check for dev or hotfix* branch and bump the version only when current branch is dev or hotfix.
branch=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p')
if [[ ${branch} = "dev" ]] || [[ ${branch} = hotfix* ]]; then
git diff-index --quiet HEAD
if [[ $? == 1 ]] ; then
    echo -e "${WARNING_FLAG} Working tree must be empty before bumping the version."
    exit 1
fi
do_version_upgrade $1
else
    echo -e "${ERROR_FLAG} Can only be used on dev or hotfix branch."
    exit 1
fi