Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/shared-increase-version-number.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:

- name: Set version number
id: version
uses: IABTechLab/uid2-shared-actions/actions/version_number@v2
uses: IABTechLab/uid2-shared-actions/actions/version_number@add-missing-patch-calculation
with:
type: ${{ inputs.release_type }}
version_number: ${{ inputs.version_number_input }}
Expand Down Expand Up @@ -89,4 +89,4 @@ jobs:
script: |
console.log('Result', '${{ steps.commit-and-tag.outcome }}');
console.log('Commit and tag', '${{ steps.commit-and-tag.outputs.git_tag_or_hash }}');
console.log('No tag', '${{ steps.commit-without-tag.outputs.git_tag_or_hash }}');
console.log('No tag', '${{ steps.commit-without-tag.outputs.git_tag_or_hash }}');
8 changes: 8 additions & 0 deletions actions/version_number/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ runs:
else
echo "new_version=$NBGV_SimpleVersion-SNAPSHOT" >> $GITHUB_OUTPUT
fi
elif [[ "${{ inputs.type }}" == "Patch" ]]; then
CURRENT_PATCH=$(echo $NBGV_SimpleVersion | awk -F. '{print $3}')
HEIGHT=$NBGV_VersionHeight
if [[ $HEIGHT -lt 1 ]]; then
HEIGHT=1
fi
NEW_PATCH=$(($CURRENT_PATCH + $HEIGHT))
echo "new_version=$NBGV_MajorMinorVersion.$NEW_PATCH" >> $GITHUB_OUTPUT
elif [[ "$BRANCH_NAME" =~ ^release.* ]]; then
git fetch --tags --all
# Find the base tag that the branch derived from
Expand Down
Loading