Skip to content

Commit 333916a

Browse files
authored
infra: bump to next version on trunk at a branch point (#4288)
1 parent 18c3efe commit 333916a

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

docs/development/releasing.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ Releasing is a 3-step process.
22

33
# 1. Create a release branch
44

5-
1. Bump a version to the new `-post` version and land a `chore: cut vX.Y.Z-post version` commit
6-
- `./utils/update_version.js vX.Y.Z-post`
75
1. On your local machine, create a new branch `release-X.Y` based off the "cutting" commit and land a `chore: mark vX.Y.Z` in the local branch:
86
- `git checkout master`
97
- `git checkout -b release-X.Y`
@@ -32,3 +30,7 @@ Once release branch is pushed, it's last commit will be picked up by our CI/CD:
3230

3331
Once release is published, the [`publish_release`](../../.github/workflows/publish_release.yml) will kick in and publish package version on NPM.
3432

33+
# 4. Bump version on trunk to next
34+
35+
1. Bump a version to the new `-next` version and land a `chore: cut vX.Y.Z-post version` commit on trunk
36+
- `./utils/update_version.js vX.Y.Z-next`

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "playwright-internal",
33
"private": true,
4-
"version": "1.5.0-post",
4+
"version": "1.6.0-next",
55
"description": "A high-level API to automate web browsers",
66
"repository": "github:Microsoft/playwright",
77
"homepage": "https://playwright.dev",

utils/update_version.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const USAGE = `
2828
2929
Examples:
3030
${SCRIPT_NAME} v1.0.0
31-
${SCRIPT_NAME} v1.0.0-post
31+
${SCRIPT_NAME} v1.0.0-next
3232
${SCRIPT_NAME} --next
3333
`;
3434

@@ -46,13 +46,10 @@ let version = process.argv[2];
4646
if (version === '--next') {
4747
const packageJSON = require('../package.json');
4848
version = packageJSON.version;
49-
const dashIndex = version.indexOf('-');
50-
if (dashIndex !== -1)
51-
version = version.substring(0, dashIndex);
52-
version += '-next.' + Date.now();
49+
version += '.' + Date.now();
5350
console.log('Setting version to ' + version);
5451
} else {
55-
if (!version || !version.match(/^v\d+\.\d+\.\d+(-post)?$/)) {
52+
if (!version || !version.match(/^v\d+\.\d+\.\d+(-next)?$/)) {
5653
console.error(`Malformed version "${version}". Use --help for details.`);
5754
process.exit(1);
5855
}

0 commit comments

Comments
 (0)