Skip to content

Commit cdceb75

Browse files
committed
chore: all the packages use the same version when release
1 parent 619bace commit cdceb75

File tree

3 files changed

+20
-115
lines changed

3 files changed

+20
-115
lines changed

.github/workflows/pre-release.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ jobs:
3636
id: semver_parser
3737
uses: xile611/read-package-version-action@main
3838
with:
39+
path: packages/vutils
3940
semver_string: ${{ github.ref_name }}
4041
semver_pattern: '^pre-release/(.*)$' # ^v?(.*)$ by default
41-
use_current_version: false # don't read package.json
4242

4343
- name: Apply prereleaseName
4444
run: node common/scripts/install-run-rush.js publish --apply --prerelease-name ${{ steps.semver_parser.outputs.pre_release_name }} --partial-prerelease
@@ -55,10 +55,16 @@ jobs:
5555
- name: Update shrinkwrap
5656
run: node common/scripts/install-run-rush.js update
5757

58+
- name: Get npm version
59+
id: package-version
60+
uses: xile611/[email protected]
61+
with:
62+
path: packages/vgrammar
63+
5864
- name: Commit & Push changes
5965
uses: actions-js/push@master
6066
with:
6167
github_token: ${{ secrets.GITHUB_TOKEN }}
62-
message: 'build: prelease version ${{ steps.semver_parser.outputs.current_version }}'
68+
message: 'build: prelease version ${{ steps.package-version.outputs.current_version }}'
6369
branch: ${{ github.ref_name }}
6470
author_name: ${{ github.actor }}
Lines changed: 6 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,8 @@
1-
/**
2-
* This is configuration file is used for advanced publishing configurations with Rush.
3-
* More documentation is available on the Rush website: https://rushjs.io
4-
*/
5-
6-
/**
7-
* A list of version policy definitions. A "version policy" is a custom package versioning
8-
* strategy that affects "rush change", "rush version", and "rush publish". The strategy applies
9-
* to a set of projects that are specified using the "versionPolicyName" field in rush.json.
10-
*/
111
[
12-
// {
13-
// /**
14-
// * (Required) Indicates the kind of version policy being defined ("lockStepVersion" or "individualVersion").
15-
// *
16-
// * The "lockStepVersion" mode specifies that the projects will use "lock-step versioning". This
17-
// * strategy is appropriate for a set of packages that act as selectable components of a
18-
// * unified product. The entire set of packages are always published together, and always share
19-
// * the same NPM version number. When the packages depend on other packages in the set, the
20-
// * SemVer range is usually restricted to a single version.
21-
// */
22-
// "definitionName": "lockStepVersion",
23-
//
24-
// /**
25-
// * (Required) The name that will be used for the "versionPolicyName" field in rush.json.
26-
// * This name is also used command-line parameters such as "--version-policy"
27-
// * and "--to-version-policy".
28-
// */
29-
// "policyName": "MyBigFramework",
30-
//
31-
// /**
32-
// * (Required) The current version. All packages belonging to the set should have this version
33-
// * in the current branch. When bumping versions, Rush uses this to determine the next version.
34-
// * (The "version" field in package.json is NOT considered.)
35-
// */
36-
// "version": "1.0.0",
37-
//
38-
// /**
39-
// * (Required) The type of bump that will be performed when publishing the next release.
40-
// * When creating a release branch in Git, this field should be updated according to the
41-
// * type of release.
42-
// *
43-
// * Valid values are: "prerelease", "release", "minor", "patch", "major"
44-
// */
45-
// "nextBump": "prerelease",
46-
//
47-
// /**
48-
// * (Optional) If specified, all packages in the set share a common CHANGELOG.md file.
49-
// * This file is stored with the specified "main" project, which must be a member of the set.
50-
// *
51-
// * If this field is omitted, then a separate CHANGELOG.md file will be maintained for each
52-
// * package in the set.
53-
// */
54-
// "mainProject": "my-app",
55-
//
56-
// /**
57-
// * (Optional) If enabled, the "rush change" command will prompt the user for their email address
58-
// * and include it in the JSON change files. If an organization maintains multiple repos, tracking
59-
// * this contact information may be useful for a service that automatically upgrades packages and
60-
// * needs to notify engineers whose change may be responsible for a downstream build break. It might
61-
// * also be useful for crediting contributors. Rush itself does not do anything with the collected
62-
// * email addresses. The default value is "false".
63-
// */
64-
// // "includeEmailInChangeFile": true
65-
// },
66-
//
67-
// {
68-
// /**
69-
// * (Required) Indicates the kind of version policy being defined ("lockStepVersion" or "individualVersion").
70-
// *
71-
// * The "individualVersion" mode specifies that the projects will use "individual versioning".
72-
// * This is the typical NPM model where each package has an independent version number
73-
// * and CHANGELOG.md file. Although a single CI definition is responsible for publishing the
74-
// * packages, they otherwise don't have any special relationship. The version bumping will
75-
// * depend on how developers answer the "rush change" questions for each package that
76-
// * is changed.
77-
// */
78-
// "definitionName": "individualVersion",
79-
//
80-
// "policyName": "MyRandomLibraries",
81-
//
82-
// /**
83-
// * (Optional) This can be used to enforce that all packages in the set must share a common
84-
// * major version number, e.g. because they are from the same major release branch.
85-
// * It can also be used to discourage people from accidentally making "MAJOR" SemVer changes
86-
// * inappropriately. The minor/patch version parts will be bumped independently according
87-
// * to the types of changes made to each project, according to the "rush change" command.
88-
// */
89-
// "lockedMajor": 3,
90-
//
91-
// /**
92-
// * (Optional) When publishing is managed by Rush, by default the "rush change" command will
93-
// * request changes for any projects that are modified by a pull request. These change entries
94-
// * will produce a CHANGELOG.md file. If you author your CHANGELOG.md manually or announce updates
95-
// * in some other way, set "exemptFromRushChange" to true to tell "rush change" to ignore the projects
96-
// * belonging to this version policy.
97-
// */
98-
// "exemptFromRushChange": false,
99-
//
100-
// // "includeEmailInChangeFile": true
101-
// }
2+
{
3+
"definitionName": "lockStepVersion",
4+
"policyName": "vutilMain",
5+
"version": "0.13.4",
6+
"nextBump": "minor"
7+
}
1028
]

rush.json

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"rushVersion": "5.94.1",
44
"pnpmVersion": "7.32.1",
55
"nodeSupportedVersionRange": ">=14.15.0 <15.0.0 || >=16.13.0 <17.0.0 || >=18.15.0 <19.0.0",
6-
// "nodeSupportedVersionInstructions": "Run 'nvs use' to switch to the expected node version.",
76
"suppressNodeLtsWarning": true,
87
"ensureConsistentVersions": true,
98
"projectFolderMinDepth": 2,
@@ -12,40 +11,34 @@
1211
"gitPolicy": {
1312
"versionBumpCommitMessage": "Bump versions [skip ci]",
1413
"changeLogUpdateCommitMessage": "Update changelogs [skip ci]"
15-
// "changefilesCommitMessage": "Rush change"
1614
},
1715
"repository": {
1816
"url": "https://github.com/VisActor/vutil",
1917
"defaultBranch": "main",
2018
"defaultRemote": "origin"
2119
},
22-
// "eventHooks": {
23-
// "preRushInstall": [],
24-
// "postRushInstall": [],
25-
// "preRushBuild": [],
26-
// "postRushBuild": []
27-
// },
28-
// "telemetryEnabled": false,
29-
// "hotfixChangeEnabled": false,
3020
"allowedProjectTags": ["tool", "share", "package", "doc"],
3121
"projects": [
3222
{
3323
"packageName": "@visactor/vscale",
3424
"projectFolder": "packages/vscale",
3525
"tags": ["package"],
36-
"shouldPublish": true
26+
"shouldPublish": true,
27+
"versionPolicyName": "vutilMain"
3728
},
3829
{
3930
"packageName": "@visactor/vutils",
4031
"projectFolder": "packages/vutils",
4132
"tags": ["package"],
42-
"shouldPublish": true
33+
"shouldPublish": true,
34+
"versionPolicyName": "vutilMain"
4335
},
4436
{
4537
"packageName": "@visactor/vdataset",
4638
"projectFolder": "packages/vdataset",
4739
"tags": ["package"],
48-
"shouldPublish": true
40+
"shouldPublish": true,
41+
"versionPolicyName": "vutilMain"
4942
},
5043
{
5144
"packageName": "@internal/bundler",

0 commit comments

Comments
 (0)