Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yoanm committed Aug 25, 2024
1 parent 8d3b84c commit 5de25f0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,22 +128,22 @@ runs:
working-directory: ${{ inputs.working-directory }}
run: |
# Update inner releases
MINOR_RELEASE_EXISTS="$( (gh release view ${MINOR_TAG} --json id -q .id | wc -l) || echo 0 )"
MAJOR_RELEASE_EXISTS="$( (gh release view ${MAJOR_TAG} --json id -q .id | wc -l) || echo 0 )"
if [[ "${MINOR_RELEASE_EXISTS}${MAJOR_RELEASE_EXISTS}" = '00' ]]; then
MINOR_RELEASE_EXISTS="$( (gh release view ${MINOR_TAG} --json id -q .id | wc -l | tr -d '[:space:]') || echo 0 )"

Check warning on line 131 in action.yml

View workflow job for this annotation

GitHub Actions / Static tests

131:121 [line-length] line too long (121 > 120 characters)
MAJOR_RELEASE_EXISTS="$( (gh release view ${MAJOR_TAG} --json id -q .id | wc -l | tr -d '[:space:]') || echo 0 )"

Check warning on line 132 in action.yml

View workflow job for this annotation

GitHub Actions / Static tests

132:121 [line-length] line too long (121 > 120 characters)
if [[ "${MINOR_RELEASE_EXISTS}${MAJOR_RELEASE_EXISTS}" -eq 0 ]]; then
echo "::warning::No inner release to update !"
exit 0
fi
AS_LATEST_PARAM=""
if [[ "`gh repo view --json latestRelease -q .latestRelease.tagName`" = "${FULL_TAG}" ]]; then
AS_LATEST_PARAM='--latest'
fi
if ! [[ "${MINOR_RELEASE_EXISTS}" = '0' ]]; then
if ! [[ "${MINOR_RELEASE_EXISTS}" -eq 0 ]]; then
echo "Updating minor release ${MINOR_TAG} with --title "${FULL_TAG}" ${AS_LATEST_PARAM}"
gh release edit ${MINOR_TAG} --title "${FULL_TAG}" ${AS_LATEST_PARAM}
fi
# Update major release at the end, so it will become the latest if --latest is used !
if ! [[ "${MAJOR_RELEASE_EXISTS}" = '0' ]]; then
if ! [[ "${MAJOR_RELEASE_EXISTS}" -eq 0 ]]; then
echo "Updating major release ${MAJOR_TAG} with --title "${FULL_TAG}" ${AS_LATEST_PARAM}"
gh release edit ${MAJOR_TAG} --title "${FULL_TAG}" ${AS_LATEST_PARAM}
fi

0 comments on commit 5de25f0

Please sign in to comment.