Skip to content

Commit

Permalink
Workflows: Fix "Stable tag:" reamde.txt field in SVN upload (#31897)
Browse files Browse the repository at this point in the history
Our SVN plugin upload workflow currently clears the `Stable tag:` field in `readme.txt` when preparing the plugin for upload to SVN. 

This commit fixes the issue by using `awk` rather than `grep` + a RegEx. Another advantage of the new solution is that it can be easily tested on a non-bash shell (e.g. on macOS).
  • Loading branch information
ockham authored May 17, 2021
1 parent bed0896 commit 3c51347
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/upload-release-to-plugin-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@ jobs:

- name: Get previous stable version
id: get_previous_stable_version
env:
STABLE_TAG_REGEX: 'Stable tag: \K${{ env.STABLE_VERSION_REGEX }}'
run: echo ::set-output name=stable_version::$(grep -oP "${STABLE_TAG_REGEX}" ./trunk/readme.txt)
run: echo ::set-output name=stable_version::$(awk -F ':\ ' '$1 == "Stable tag" {print $2}' ./trunk/readme.txt)

- name: Delete everything
working-directory: ./trunk
Expand Down

0 comments on commit 3c51347

Please sign in to comment.