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,8 +61,14 @@ 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)
if [[ "${{github.ref}}" == "refs/heads/main" ]]; then
PRS=($(comm -12 <(git log --oneline ${TAG}.. --format="tformat:%H" | sort ) <(hub pr list -s all -f '%sm%n' --color=never | sort ))) 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 ' ' '|')")) 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 for frag in "${FRAGMENTS[@]}"; do
PR=$(echo $frag|cut -d~ -f2) PR=$(echo $frag|cut -d~ -f2)
type="$(echo $frag|cut -d~ -f3)" type="$(echo $frag|cut -d~ -f3)"
@ -76,6 +82,7 @@ jobs:
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 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:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

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