docs: fix unbalanced quotes in release workflow
parent
fddfa9a493
commit
9d57057272
|
@ -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:
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -31,4 +31,4 @@ build_ignore:
|
||||||
- molecule
|
- molecule
|
||||||
- .github
|
- .github
|
||||||
- '*.tar.gz'
|
- '*.tar.gz'
|
||||||
- '*.zip'
|
- '*.zip'
|
||||||
|
|
Loading…
Reference in New Issue