Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVN Upload Workflow: Stable tag: isn't set in readme.txt #31357

Closed
ockham opened this issue Apr 29, 2021 · 6 comments · Fixed by #31897
Closed

SVN Upload Workflow: Stable tag: isn't set in readme.txt #31357

ockham opened this issue Apr 29, 2021 · 6 comments · Fixed by #31897
Assignees
Labels
Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@ockham
Copy link
Contributor

ockham commented Apr 29, 2021

While releasing GB 10.5.1 and 10.5.2 today, @youknowriad noticed that the Stable tag: field isn't being set in the plugin's readme.txt in the WP.org plugin repo (SVN) anymore.

I looked at previous versions and found that the last version that had it set was 10.2.1 -- starting from 10.3.0, the Stable tag: was empty.

Fortunately, this seems rather low-impact, as WP.org apparently falls back to what it determines to be the latest version (probably based on release date, or version comparisons -- both of which work for GB, as per our current release procedure).

For reference, this is the code that's supposed to set the Stable tag::

- name: Update the plugin's stable version
working-directory: ./trunk
run: |
sed -i "s/Stable tag: ${STABLE_VERSION_REGEX}/Stable tag: ${VERSION}/g" ./readme.txt
svn commit -m "Releasing version $VERSION" \
--no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD"

@ockham ockham added [Type] Bug An existing feature does not function as intended Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts labels Apr 29, 2021
@ockham
Copy link
Contributor Author

ockham commented Apr 29, 2021

This seems to coincide with #28138 (or maybe #30212).

@ockham
Copy link
Contributor Author

ockham commented Apr 29, 2021

Upon closer inspection of the SVN log (note the Committing version x.y.z vs Releasing version x.y.z commit messages, and to which steps of the workflow they relate), I think it's probably this step that didn't work:

- name: Replace the stable tag placeholder with the existing stable tag on the SVN repository
env:
STABLE_TAG_PLACEHOLDER: 'Stable tag: V\.V\.V'
STABLE_TAG: 'Stable tag: ${{ steps.get_previous_stable_version.outputs.stable_version }}'
run: sed -i "s/${STABLE_TAG_PLACEHOLDER}/${STABLE_TAG}/g" ./trunk/readme.txt

@ockham
Copy link
Contributor Author

ockham commented Apr 29, 2021

Yeah, I think I've tracked it down to here: https://github.com/WordPress/gutenberg/runs/2239867087?check_suite_focus=true

image

@ockham
Copy link
Contributor Author

ockham commented Apr 29, 2021

Seems like steps.get_previous_stable_version.outputs.stable_version was empty 🤔

- 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)

Could it be an issue with escaping? 🤔

@ocean90
Copy link
Member

ocean90 commented May 13, 2021

This needs to get fixed since currently the plugin directory simply falls back to trunk. See https://api.wordpress.org/plugins/info/1.0/gutenberg.json?fields=stable_tag,short_description where stable_tag is set to trunk.

This prevents using the dev and stable projects for translations as currently only dev is used.

@ockham
Copy link
Contributor Author

ockham commented May 17, 2021

I'll look into fixing this 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants