-
Notifications
You must be signed in to change notification settings - Fork 325
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
Add pre-release documentation with version numbers #3977
Conversation
Thanks for picking this up! These existing prerelease docs are focused on releasing 'to GitHub' – in step 6 when we run Is there value in prereleases to GitHub having a pre-release version number? I'm wondering if we're conflating two things that should be kept separate? Maybe we need different terms for 'pre-releases pushed to GitHub' (which I think are still useful for e.g. exploratory testing) and 'pre-releases to npm' which are more like release candidates? |
@36degrees Thought we should put @querkmachine's versioning work into action When we run It'll be confusing if our first pre-release identifies the version as CSS versiongetComputedStyle(document.body)
.getPropertyValue('--govuk-frontend-version') JS versionawait import('/javascripts/govuk-frontend.min.js')
.then(({ version }) => console.log(version)) So instead of seeing
Is it the Have a look down the
Not for this PR, but publishing to npm is just one script tweak away |
I think it makes sense to use incremental version numbers ( But, we also sometimes create GitHub-based pre-releases from feature branches just to test something. Effectively, these are 'throw-away' releases just to spike something, try something out in the Design System repo or Prototype Kit etc. I can see how it'd be useful to have a different version identifier in those instances, but I don't think it should be incremental or tied to any specific version for a couple of reasons.
|
Ah my fault, I saw the Update a pre-release steps and thought they were iterative So that all our v5 pre-release users can clearly identify which iteration they're on, can we support both? npm version 5.0.0-adhoc --no-git-tag-version --workspace govuk-frontend
npm version 5.0.0-colin --no-git-tag-version --workspace govuk-frontend
npm version 5.0.0-ollie --no-git-tag-version --workspace govuk-frontend |
For 'actual' pre-releases to npm, I have no issue using the This is just about pre-releases from feature branches. Using the branch name for the version number might be a good option? Given it seems like we're getting in a muddle I'm starting to think we do need distinct terms and documentation… |
6bcc6b1
to
c05d70c
Compare
Yeah that works, I've updated and pushed the docs We need the branch name as a suffix like I've added incremental pre-releases following the Update a pre-release steps as an alternative.
Would certainly align with "working in the open" if every GitHub pre-release was published for easy Let's ask @domoscargin for feedback as well |
I think the branch name as a suffix makes sense, mostly. But how would we ensure consistency there? If I'm doing a quick throwaway thing that isn't yet targeting a release, I'd probably have to go with either:
Not a particularly big concern, but could end slightly messy. Other than that, all the |
c05d70c
to
0fa7df5
Compare
The worry at the moment is we use 1) the "current version" so the v5 pre-release will be:
For now, I've pushed up a more generic version where
At pre-release time, if we want to incorporate the branch name that's fine |
For our v5 pre-releases we’re probably going to have at least three? No doubt more
But for Design System previews we'll likely do the same for new typography scale pre-releases Can we think of a naming convention that works with |
Following this morning's dev catch-up and further slack discussions, we're going to clearly separate the concept of "pre-release" (to npm) from "preview branches" (on a branch on Github, which we currently call pre-release 😱 ). We need to do a little more research on how to handle npm pre-releases (especially on how to handle the version bump, suffix or suffixes to use, changelog, docs...). We can already start updating our documentation for releasing to a preview branch, though. |
I think this needs updating so that any changes to accommodate pre-releases are made to our existing release documentation instead? Is that right? |
@36degrees Yeah let's get it back into draft as it's not needed for v5.0.0 preview anymore I'll fix the conflicts, push it up, but can work on it another day |
0fa7df5
to
1de4128
Compare
1de4128
to
9917a94
Compare
📋 StatsFile sizes
Modules
View stats and visualisations on the review app Action run for 7792ae8 |
9917a94
to
9ec1542
Compare
9ec1542
to
c09059b
Compare
Both beta and internal pre-releases will be merged to main
This will make it easier to know the name of branch for pre-releases
28f9767
to
f3f7e6d
Compare
Updated with the following changes, based on our last pre-release runs:
|
- Clarifies a couple of instructions - Harmonises the capitalisation of GitHub - Add link to CHANGELOG.md when needing to make the release notes
ccd0cca
to
478ed2d
Compare
478ed2d
to
d8bc64f
Compare
@colinrotherham I've updated based on what you spotted during this morning's pre-release, and tried to address your two comments 😊 |
- commit the changes | ||
- push a branch to GitHub | ||
|
||
You will now be prompted to continue or cancel. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might seem pedantic, but should we give the user an action here? Similar to step 5 of "Publish a release to npm"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we can here. In the npm part, step 4, we can guide the users towards pressing N
as we know they'll have to change from 'latest' to 'next' or 'internal'. This is more like the step 5 of npm where we need the person driving to have a pause and consider whether to continue, rather than automatically go "'y', let's go!"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I was looking to make this look a bit more like step 5 in "Publish a release to npm" to clarify what happens if they continue, and what happens if they cancel.
At the moment, it's slightly unclear whether the list of things that get done when we run the command happen before or after the prompt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see, yeah, I can add the same clarification here, good shout 😊
|
||
This step will create a ZIP file containing the release in the root of your govuk-frontend git directory. You will need this file when creating the GitHub release. | ||
|
||
It will also automatically create a tag in GitHub which you can use to create a GitHub release in the following section. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pedantic: it's not super clear what "it" is referring to here, since we're talking about a file just before, instead of "this step".
b63a788
to
98ce5b5
Compare
@domoscargin I've addressed your suggestions and replied when I didn't make an update. Ready for another review 😊 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@romaricpascal Looking good. I've left one comment where I think we can still be clearer, but I wouldn't consider it blocking - we can always tweak this as we do more pre-releases.
Co-authored-by: Brett Kyle <brett.kyle@digital.cabinet-office.gov.uk> Co-authored-by: Colin Rotherham <colin.rotherham@digital.cabinet-office.gov.uk>
98ce5b5
to
7792ae8
Compare
This PR adds pre-release documentation and sets a version number using
npm version
docs
folder is up to date with new structure #3639Pre-release version numbers
For example, for early preview of
v5.0.0
from branchmain
we could:premajor
to bump fromv4.7.0
tov5.0.0-beta.0
preminor
to bump fromv4.7.0
tov4.8.0-beta.0
prepatch
to bump fromv4.7.0
tov4.7.1-beta.0
prerelease
to bump fromv5.0.0-beta.0
tov5.0.0-beta.1
This determines the
npm version
command to update package.json and package-lock.json:Unlike previews, pre-releases must pick patch/minor/major bumps so it's hard to automatically version