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

Automatically set calver version in changelog and package.json #2382

Open
wants to merge 1 commit into
base: unstable
Choose a base branch
from

Conversation

MitchLillie
Copy link
Contributor

@MitchLillie MitchLillie commented Sep 27, 2024

Background

Just an idea I had: https://shopify.slack.com/archives/C0683EBQ55M/p1727287021016169?thread_ts=1727285984.795059&cid=C0683EBQ55M

Solution

We add a script to be run after changeset version which should simplify step 5 of Creating new stable versions

🎩

  1. Create a github personal access token with read:user and repo:status permissions. Copy its value.
  2. In the list of PATs, select Configure SSO -> Authorize next to Shopify.
  3. Checkout this branch, and then checkout a new branch from here with a valid name (YYYY-MM, so 2027-03, or whatever value you like).
  4. In your terminal run GITHUB_TOKEN=<your token here> yarn calver - this simulates a new stable release created from unstable.
  5. Check the package.json and CHANGELOG.md files in each of the packages/ subdirectories (the top-level package.json doesn't change). They should all have a version corresponding to your branch name. For example, if you chose 2027-03 as your branch you should see 2027.3.0.
  6. Run GITHUB_TOKEN=<your token here> yarn calver - This simulates a patch release on a pre-existing stable release.
  7. Check the package.json and CHANGELOG.md files again. You should see the patch number incremented by 1. For example, if you chose 2027-03 as your branch, and you saw 2027.3.0 in the previous step, it should now read 2027.3.1.

Checklist

  • I have 🎩'd these changes
  • I have updated relevant documentation

Copy link
Contributor

@belalsj belalsj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎩 'ed. LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants