Skip to content

Commit

Permalink
update GIT_BRANCH handling
Browse files Browse the repository at this point in the history
  • Loading branch information
wildone committed Mar 10, 2021
1 parent 9737667 commit 275eb8f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/github/github_get_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ git fetch --unshallow --tags 2>&1 || true
export CURRENT_VERSION=$(git describe --tag --always --long | sed -e 's/\(.*\)-\(.*\)-.*/\1.\2/')

#get current branch name
export GIT_BRANCH=$(git branch --show-current)
echo "GIT_BRANCH=${GIT_BRANCH}" >> $GITHUB_ENV
echo "GIT_BRANCH=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV
echo "GIT_BRANCH=$(echo ${GITHUB_HEAD_REF} | tr / -)" >> $GITHUB_ENV
echo ::set-output name=GIT_BRANCH::${GIT_BRANCH}
echo "GIT_BRANCH:${GIT_BRANCH}"


echo "CURRENT_VERSION:${CURRENT_VERSION}"
declare -a CURRENT_VERSION_ARRAY="(${CURRENT_VERSION//./ })";
export SEMVER_MAJOR=${CURRENT_VERSION_ARRAY[0]};
Expand Down

0 comments on commit 275eb8f

Please sign in to comment.