Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.

Commit

Permalink
Fix wrong versioning on test branch issue
Browse files Browse the repository at this point in the history
  • Loading branch information
juliansangillo committed Aug 25, 2020
1 parent 5cb314c commit 16b2551
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/tag-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,15 @@ getLatestRevision() {
}

getRevisionType() {
local MESSAGE="$(git show -s --format=%s HEAD)";
local BRANCH="$1";

if [ "$BRANCH" = "$DEV_BRANCH" ]; then
local MESSAGE="$(git show -s --format=%s HEAD)";
elif [ "$BRANCH" = "$TEST_BRANCH" ]; then
local MESSAGE="$(git show -s --format=%s HEAD~1)";
else
local MESSAGE="$(git show -s --format=%s HEAD~2)";
fi

outLog "Getting revision type from commit message ...";
outLog "(major, minor, build)";
Expand Down Expand Up @@ -109,7 +117,7 @@ pullRevisionIntoTest() {
outLog "Old Version: $OLD_VERSION";

split '.' $OLD_VERSION;
return_arr[3]="${test_BRANCH^^}";
return_arr[3]="${TEST_BRANCH^^}";

echo "$(join . ${return_arr[@]})"
}
Expand Down

0 comments on commit 16b2551

Please sign in to comment.