Open jsmith-kno2 opened 1 year ago
Internal ticket created : TS-653
In the off chance someone else comes across this problem and needs an immediate solution, this is how I've created a workaround:
id: override
run: |
if [[ "$GITHUB_BASE_REF" == "rc" && "$GITHUB_HEAD_REF" == "master" ]]; then
echo "release_branch=something_other_than_master_to_force_prerelease_version_generation" >> $GITHUB_ENV
else
echo "release_branch=master" >> $GITHUB_ENV
fi
- name: Generate new version
id: version
uses: codacy/git-version@2.8.0
with:
release-branch: ${{ steps.override.outputs.release_branch}}
I have the following branching strategy:
master
->rc
->feature branch
master
->hotfix
Nothing remarkable;
master
represents what's in prod. We work in sprints, so therc
branch represents the accumulated sprint work. Occasionally we have an issue in prod that requires immediate resolution. In those cases, we branch frommaster
to develop the hotfix. After the hotfix is merged intomaster
, we need to merge those changes forward intorc
.I'm encountering an issue with the generated version when performing this merge forward from
master
torc
. I expected the version to be a pre-release as the base is not the default branch but instead it's generating a full release version because the current branch is the default branch.Any suggestions or is this something that should possibly be considered in the version generation code?