mirror of
https://github.com/microsoft/playwright.git
synced 2025-01-03 08:54:05 +03:00
infra: bump to next version on trunk at a branch point (#4288)
This commit is contained in:
parent
18c3efe79e
commit
333916a83d
@ -2,8 +2,6 @@ Releasing is a 3-step process.
|
||||
|
||||
# 1. Create a release branch
|
||||
|
||||
1. Bump a version to the new `-post` version and land a `chore: cut vX.Y.Z-post version` commit
|
||||
- `./utils/update_version.js vX.Y.Z-post`
|
||||
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:
|
||||
- `git checkout master`
|
||||
- `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:
|
||||
|
||||
Once release is published, the [`publish_release`](../../.github/workflows/publish_release.yml) will kick in and publish package version on NPM.
|
||||
|
||||
# 4. Bump version on trunk to next
|
||||
|
||||
1. Bump a version to the new `-next` version and land a `chore: cut vX.Y.Z-post version` commit on trunk
|
||||
- `./utils/update_version.js vX.Y.Z-next`
|
||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "playwright-internal",
|
||||
"version": "1.5.0-post",
|
||||
"version": "1.6.0-next",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "playwright-internal",
|
||||
"private": true,
|
||||
"version": "1.5.0-post",
|
||||
"version": "1.6.0-next",
|
||||
"description": "A high-level API to automate web browsers",
|
||||
"repository": "github:Microsoft/playwright",
|
||||
"homepage": "https://playwright.dev",
|
||||
|
@ -28,7 +28,7 @@ const USAGE = `
|
||||
|
||||
Examples:
|
||||
${SCRIPT_NAME} v1.0.0
|
||||
${SCRIPT_NAME} v1.0.0-post
|
||||
${SCRIPT_NAME} v1.0.0-next
|
||||
${SCRIPT_NAME} --next
|
||||
`;
|
||||
|
||||
@ -46,13 +46,10 @@ let version = process.argv[2];
|
||||
if (version === '--next') {
|
||||
const packageJSON = require('../package.json');
|
||||
version = packageJSON.version;
|
||||
const dashIndex = version.indexOf('-');
|
||||
if (dashIndex !== -1)
|
||||
version = version.substring(0, dashIndex);
|
||||
version += '-next.' + Date.now();
|
||||
version += '.' + Date.now();
|
||||
console.log('Setting version to ' + version);
|
||||
} else {
|
||||
if (!version || !version.match(/^v\d+\.\d+\.\d+(-post)?$/)) {
|
||||
if (!version || !version.match(/^v\d+\.\d+\.\d+(-next)?$/)) {
|
||||
console.error(`Malformed version "${version}". Use --help for details.`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user