Skip to content

Commit

Permalink
re-add redundant condition from env-vars-conf [ED-11261]
Browse files Browse the repository at this point in the history
  • Loading branch information
davseve committed Jul 24, 2023
1 parent cfac94c commit a268a62
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/env-vars-configure/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ runs:
# and extracts the version number from the tag name using awk. E.g. retrieves the number 7 from `3.11.0-cloud7`.
# If the channel is tagged as a prerelease, than get the latest prerelease version
# If the channel is not tagged as a prerelease, than get the latest version which is not a prerelease or an rc
CURRENT_CHANNEL_VERSION=$(git ls-remote --tags | grep -v "\-rc" | grep -v "\-prerelease" | grep -v "refs/tags/v" | grep "${{ inputs.CHANNEL }}" | grep "${{ env.CLEAN_PACKAGE_VERSION }}" | tail -n1 | awk -F'${{ inputs.CHANNEL }}' '{print $2}' || echo 0)
if [[ "${{ inputs.ADDITION_NAME }}" == "-prerelease" ]]; then
CURRENT_CHANNEL_VERSION=$(git ls-remote --tags | grep "\-prerelease" | grep -v "refs/tags/v" | grep "${{ inputs.CHANNEL }}" | grep "${{ env.CLEAN_PACKAGE_VERSION }}" | tail -n1 | awk -F'${{ inputs.CHANNEL }}' '{print $2}' | awk -F'${{ inputs.ADDITION_NAME }}' '{print $1}' || echo 0)
else
CURRENT_CHANNEL_VERSION=$(git ls-remote --tags | grep -v "\-rc" | grep -v "\-prerelease" | grep -v "refs/tags/v" | grep "${{ inputs.CHANNEL }}" | grep "${{ env.CLEAN_PACKAGE_VERSION }}" | tail -n1 | awk -F'${{ inputs.CHANNEL }}' '{print $2}' || echo 0)
fi
# If value is not a number (e.g. empty string) then set it to 0
if ! [[ $CURRENT_CHANNEL_VERSION =~ ^[0-9]+$ ]]; then
Expand Down

0 comments on commit a268a62

Please sign in to comment.