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

Rename GitHub branch early releases to “previews” #4000

Merged
merged 3 commits into from
Jul 24, 2023

Conversation

colinrotherham
Copy link
Contributor

@colinrotherham colinrotherham commented Jul 24, 2023

This PR renames our publishing-a-pre-release.md process:

Publish pre-release of GOV.UK Frontend
This pre-release guidance is aimed at Design System team members.

To the term "preview" rather than "pre-release":

Publish preview of GOV.UK Frontend
This preview guidance is aimed at Design System team members.

We've decided to refer to ad-hoc GitHub branch releases as “previews” since they're not published to npm

Package version for previews

All preview builds now run npm version to suffix the branch name in the package.json "version"

We can now identify preview versions of GOV.UK Frontend when deployed as part of:

@colinrotherham colinrotherham added the documentation User requests new documentation or improvements to existing documentation label Jul 24, 2023
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4000 July 24, 2023 10:29 Inactive
@colinrotherham colinrotherham force-pushed the publish-preview-branch branch from 6494cad to e549eb7 Compare July 24, 2023 10:46
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4000 July 24, 2023 10:46 Inactive
@colinrotherham colinrotherham force-pushed the publish-preview-branch branch from e549eb7 to 2102013 Compare July 24, 2023 10:47
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4000 July 24, 2023 10:48 Inactive
Copy link
Member

@romaricpascal romaricpascal left a comment

Choose a reason for hiding this comment

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

Nice! Just a little suggestion for the name of the script, a missing article and a little formatting improvement 😊

CONTRIBUTING.md Outdated Show resolved Hide resolved
bin/preview.sh Outdated Show resolved Hide resolved
docs/releasing/publishing-a-preview.md Outdated Show resolved Hide resolved
package.json Outdated
@@ -19,7 +19,7 @@
"start": "npm run dev",
"build-release": "./bin/build-release.sh",
"publish-release": "./bin/publish-release.sh",
"pre-release": "./bin/pre-release.sh",
"preview": "./bin/preview.sh",
Copy link
Member

Choose a reason for hiding this comment

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

suggestion I think it'd be worth updating that script name to publish-preview (as preview on its own may lead to thinking it starts some local preview).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, wouldn't it be build-preview as it's paired with build-release?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll go with publish-preview since that's the task (publishing to a GitHub branch)

But yeah the script is mostly similar to build-release

docs/releasing/publishing-a-preview.md Outdated Show resolved Hide resolved
We’ll refer to ad-hoc GitHub branch releases as “previews” and only use the term “pre-release” for early releases that are also published to npm
We add the `npm version` flag `--allow-same-version` to allow existing previews to updated with the same version number

We can’t use `npm pkg get version` due to output differences between npm v8 and v9, plus a “double output” bug only seen in v9:

* npm/cli#5481
@colinrotherham colinrotherham force-pushed the publish-preview-branch branch from 2102013 to 5a5dacd Compare July 24, 2023 12:35
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4000 July 24, 2023 12:36 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4000 July 24, 2023 12:37 Inactive
@@ -50,7 +50,8 @@
"build:package": "gulp build:package --color",
"build:release": "gulp build:release --color",
"build:stats": "npm run stats --workspace govuk-frontend-stats",
"dev": "gulp dev --color"
"dev": "gulp dev --color",
"version": "echo $npm_package_version"
Copy link
Member

Choose a reason for hiding this comment

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

Nice one! That's clever 😍

Copy link
Member

@romaricpascal romaricpascal left a comment

Choose a reason for hiding this comment

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

Forgot to approve as I posted that last comment 🤦🏻

@colinrotherham colinrotherham merged commit 8bb087c into main Jul 24, 2023
@colinrotherham colinrotherham deleted the publish-preview-branch branch July 24, 2023 15:19
colinrotherham added a commit that referenced this pull request Jul 27, 2023
paulrobertlloyd pushed a commit to x-govuk/govuk-frontend that referenced this pull request Jul 27, 2023
Rename GitHub branch early releases to “previews”
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation User requests new documentation or improvements to existing documentation
Projects
Development

Successfully merging this pull request may close these issues.

4 participants