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 d99d562 commit 9a02f45
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,22 +127,23 @@ runs:
MAJOR_TAG: ${{ steps.generate-tags.outputs.major }}
working-directory: ${{ inputs.working-directory }}
run: |
# Update inner releases
MINOR_RELEASE_EXISTS="$(gh release view ${MINOR_TAG} --json id -q .id | wc -l )"

Check warning on line 131 in action.yml

View workflow job for this annotation

GitHub Actions / Static tests

131:81 [line-length] line too long (88 > 80 characters)
MAJOR_RELEASE_EXISTS="$(gh release view ${MAJOR_TAG} --json id -q .id | wc -l )"

Check warning on line 132 in action.yml

View workflow job for this annotation

GitHub Actions / Static tests

132:81 [line-length] line too long (88 > 80 characters)
if [[ "${MINOR_RELEASE_EXISTS}${MAJOR_RELEASE_EXISTS}" = '00' ]]; then
echo "::warning::No inner release to update !"
exit 0
fi
PARAMS='-t "${FULL_TAG}"'
if ! [[ "`gh repo view --json latestRelease -q .latestRelease.tagName`" = "${FULL_TAG}" ]]; then
PARAMS+=' --latest'
AS_LATEST_PARAM=""
if [[ "`gh repo view --json latestRelease -q .latestRelease.tagName`" = "${FULL_TAG}" ]]; then

Check warning on line 138 in action.yml

View workflow job for this annotation

GitHub Actions / Static tests

138:81 [line-length] line too long (102 > 80 characters)
AS_LATEST_PARAM='--latest'
fi
if ! [[ "${MINOR_RELEASE_EXISTS}" = '0' ]]; then
echo "Updating minor release ${MINOR_TAG}"
gh release edit ${MINOR_TAG} ${PARAMS}
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 !

Check warning on line 145 in action.yml

View workflow job for this annotation

GitHub Actions / Static tests

145:81 [line-length] line too long (93 > 80 characters)
if ! [[ "${MAJOR_RELEASE_EXISTS}" = '0' ]]; then
echo "Updating major release ${MAJOR_TAG}"
gh release edit ${MAJOR_TAG} ${PARAMS}
gh release edit ${MAJOR_TAG} --title '${FULL_TAG}' ${AS_LATEST_PARAM}
fi

0 comments on commit 9a02f45

Please sign in to comment.