Open NickSeagull opened 2 years ago
I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.
rush.json
⚠️ No Changes Made
Modify rush.json with contents:
• In the `rush.json` file, locate the `"versionBumpCommitMessage"` field under the `"gitPolicy"` section. This field determines the commit message used when committing changes during 'rush version'.
• Modify the `"versionBumpCommitMessage"` field to include the version tag in the format `vX.Y.Z`. For example, you could change it to `"versionBumpCommitMessage": "Bump version to vX.Y.Z [skip ci]"`. This will ensure that the commit message includes the version tag when Rush bumps the version.
Sandbox logs for
b37f8de
❌
npm i
1/1 ❌ (`254`)npm ERR! code ENOENT npm ERR! syscall open npm ERR! path /repo/package.json npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, open '/repo/package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-10-16T21_06_18_799Z-debug-0.log
b37f8de
❌
npm i
1/1 ❌ (`254`)npm ERR! code ENOENT npm ERR! syscall open npm ERR! path /repo/package.json npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, open '/repo/package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-10-16T21_13_32_824Z-debug-0.log
b37f8de
❌
npm i
1/1 ❌ (`254`)npm ERR! code ENOENT npm ERR! syscall open npm ERR! path /repo/package.json npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, open '/repo/package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-10-16T21_21_43_501Z-debug-0.log
common/config/rush/version-policies.json
⚠️ No Changes Made
Modify common/config/rush/version-policies.json with contents:
• In the `common/config/rush/version-policies.json` file, locate the `"policyName"` field under the `"definitionName": "lockStepVersion"` section. This field determines the version policy used by Rush.
• Modify the `"policyName"` field to ensure that all packages in the monorepo use the same version. For example, you could change it to `"policyName": "monorepo"`. This will ensure that Rush uses the same version for all packages in the monorepo.
Sandbox logs for
5ff59fb
❌
npm i
1/1 ❌ (`254`)npm ERR! code ENOENT npm ERR! syscall open npm ERR! path /repo/package.json npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, open '/repo/package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-10-16T21_24_39_677Z-debug-0.log
5ff59fb
❌
npm i
1/1 ❌ (`254`)npm ERR! code ENOENT npm ERR! syscall open npm ERR! path /repo/package.json npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, open '/repo/package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-10-16T21_27_12_527Z-debug-0.log
5ff59fb
❌
npm i
1/1 ❌ (`254`)npm ERR! code ENOENT npm ERR! syscall open npm ERR! path /repo/package.json npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, open '/repo/package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-10-16T21_36_50_241Z-debug-0.log
5ff59fb
❌
npm i
1/1 ❌ (`254`)npm ERR! code ENOENT npm ERR! syscall open npm ERR! path /repo/package.json npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, open '/repo/package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-10-16T21_48_05_071Z-debug-0.log
.github/workflows/release.yml
Create .github/workflows/release.yml with contents:
• Create a new GitHub Actions workflow file at `.github/workflows/release.yml`.
• In this file, define a new workflow that runs whenever a new tag is pushed to the repository. You can use the `on: push: tags:` syntax to trigger the workflow on tag pushes.
• In the workflow, add a step that creates a new GitHub release. You can use the `actions/create-release@v1` action for this. Set the `tag_name` input to the tag of the current commit, which you can get with `${{ github.ref }}`.
• Add another step that reads the latest changes from the `packages/framework-core/CHANGELOG.md` file and adds them to the release. You can use shell commands to read the file and the `actions/github-script@v3` action to update the release with the changelog content.
Working on it...
💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request. Join Our Discord
Bug Report
Current Behavior
When using rush to create a new version of Booster, the current configuration generates a tag for each package, forcing us to manually create the
vX.Y.Z
tag.Expected behavior
When a new version is published during CI/CD, the last commit is tagged with a single tag in the format
vX.Y.Z
.Ideally, a new GitHub release should be created, filled with the latest changes from the changelog file (
packages/framework-core/CHANGELOG.md
)Possible Solution
Update the rush configuration to generate a single tag for the entire monorepo instead of a tag for each package.
Checklist
- [X] ``rush.json`` ⚠️ No Changes Made - [X] ``common/config/rush/version-policies.json`` ⚠️ No Changes Made - [ ] `.github/workflows/release.yml`