Skip to content

Commit

Permalink
chore(release): replace yarn version with bump
Browse files Browse the repository at this point in the history
- yarn version pre* strategies not working (yarnpkg/berry#4191)
- yarn version does not support --preid flag (https://docs.npmjs.com/cli/v8/commands/npm-version/#preid)
- https://github.com/JS-DevTools/version-bump-prompt
- https://yarnpkg.com/cli/version

Signed-off-by: Lexus Drumgold <[email protected]>
  • Loading branch information
unicornware committed Aug 3, 2022
1 parent e1f9e4b commit 1eca0be
Show file tree
Hide file tree
Showing 4 changed files with 241 additions and 10 deletions.
7 changes: 6 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,15 @@ e.g:
Before releasing, the following steps must be completed:
1. Schedule a code freeze
2. Decide what version bump the package needs (major, minor, or patch)
2. Decide what type of version bump the package needs
- `yarn release <new-version>`
- `yarn release major`
- `yarn release minor`
- `yarn release patch`
- `yarn release premajor --pre <dist-tag>`
- `yarn release preminor --pre <dist-tag>`
- `yarn release prepatch --pre <dist-tag>`
- `yarn release prerelease --pre <dist-tag>`
3. Open a new PR from `release/*` into `main`
- do **not** change the PR title
- should match `release: <package.json#name>@<new-version>`
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@
"tsconfig": "7.0.0",
"tsconfig-paths": "4.0.0",
"unbuild": "0.7.6",
"version-bump-prompt": "6.1.0",
"vite-tsconfig-paths": "3.5.0",
"vitest": "0.20.3",
"vitest-github-actions-reporter": "0.8.1",
Expand Down
4 changes: 2 additions & 2 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# References:
#
# - https://yarnpkg.com/cli/version
# - https://github.com/JS-DevTools/version-bump-prompt#usage
# - https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-cli

# 1. run tests
Expand All @@ -18,7 +18,7 @@
# 9. push release branch to origin

yarn test
yarn version -i $@
bump $@
conventional-changelog -n ./changelog.config.json -i CHANGELOG.md -s
VERSION=$(fx package.json '.version')
RELEASE_BRANCH=release/$VERSION
Expand Down
Loading

0 comments on commit 1eca0be

Please sign in to comment.