docs: fix unbalanced quotes in release workflow

main
Guido Grazioli 2022-04-01 13:06:34 +02:00
parent fddfa9a493
commit 9d57057272
No known key found for this signature in database
GPG Key ID: 22C8C31EF2BC093B
3 changed files with 22 additions and 15 deletions

View File

@ -61,20 +61,27 @@ jobs:
run: | run: |
TYPES=("minor_changes" "major_changes" "bugfixes" "deprecated_features" "removed_features" "breaking_changes") TYPES=("minor_changes" "major_changes" "bugfixes" "deprecated_features" "removed_features" "breaking_changes")
TAG=$(git describe --abbrev=0 --tags) TAG=$(git describe --abbrev=0 --tags)
PRS=($(comm -12 <(git log --oneline ${TAG}.. --format="tformat:%H" | sort ) <(hub pr list -s all -f '%sm%n' --color=never | sort )))
IFS=$'\n' FRAGMENTS=($(hub pr list -s all -f '%sm~%I~%L~%t~%n' --color=never| grep -P "$(echo "^(${PRS[@]})" | tr ' ' '|')"))
for frag in "${FRAGMENTS[@]}"; do
PR=$(echo $frag|cut -d~ -f2)
type="$(echo $frag|cut -d~ -f3)"
msg="$(echo $frag|cut -d~ -f4|sed 's/`/``/g')"
if [[ "${TYPES[*]}" =~ "${type}" ]]; then
echo -e "$type:\n - >\n $msg \`#${PR} <https://github.com/ansible-middleware/keycloak/pull/${PR}>\`_" \
> changelogs/fragments/${PR}.yaml
fi
done
antsibull-changelog lint -vvv
if [[ "${{github.ref}}" == "refs/heads/main" ]]; then if [[ "${{github.ref}}" == "refs/heads/main" ]]; then
antsibull-changelog release --version "$(grep version galaxy.yml | awk -F'"' '{ print $2 }')-devel" -v PRS=($(comm -12 <(git log --oneline ${TAG}.. --format="tformat:%H" | sort ) <(hub pr list -s all -f '%sm%n' --color=never | sort )))
else
PREV_TAG=$(git tag | grep -P "^[0-9]+[.][0-9]+[.][0-9]+$" | sort --version-sort -r | head -n2 | grep -v "${TAG}")
PRS=($(comm -12 <(git log --oneline ${PREV_TAG}..${TAG} --format="tformat:%H" | sort ) <(hub pr list -s all -f '%sm%n' --color=never | sort )))
fi
if [[ ${#PRS[@]} > 0 ]]; then
IFS=$'\n' FRAGMENTS=($(hub pr list -s all -f '%sm~%I~%L~%t~%n' --color=never | grep -P "$(echo "^(${PRS[@]})" | tr ' ' '|')"))
for frag in "${FRAGMENTS[@]}"; do
PR=$(echo $frag|cut -d~ -f2)
type="$(echo $frag|cut -d~ -f3)"
msg="$(echo $frag|cut -d~ -f4|sed 's/`/``/g')"
if [[ "${TYPES[*]}" =~ "${type}" ]]; then
echo -e "$type:\n - >\n $msg \`#${PR} <https://github.com/ansible-middleware/keycloak/pull/${PR}>\`_" \
> changelogs/fragments/${PR}.yaml
fi
done
antsibull-changelog lint -vvv
if [[ "${{github.ref}}" == "refs/heads/main" ]]; then
antsibull-changelog release --version "$(grep version galaxy.yml | awk -F'"' '{ print $2 }')-devel" -v
fi
fi fi
working-directory: ansible_collections/middleware_automation/keycloak working-directory: ansible_collections/middleware_automation/keycloak
env: env:

View File

@ -90,7 +90,7 @@ jobs:
run: | run: |
git config user.name github-actions git config user.name github-actions
git config user.email github-actions@github.com git config user.email github-actions@github.com
git tag -a ${{ steps.get_version.outputs.TAG_VERSION }}" -m "Release v${{ steps.get_version.outputs.TAG_VERSION }}" || true git tag -a ${{ steps.get_version.outputs.TAG_VERSION }} -m "Release v${{ steps.get_version.outputs.TAG_VERSION }}" || true
git push origin --tags git push origin --tags
- name: Publish Release - name: Publish Release

View File

@ -31,4 +31,4 @@ build_ignore:
- molecule - molecule
- .github - .github
- '*.tar.gz' - '*.tar.gz'
- '*.zip' - '*.zip'