Conversation
| "preversion": "run-p -l test build", | ||
| "version": "yarn update-changelog && git add CHANGELOG.md", | ||
| "new-version": "yarn version --no-git-tag-version", | ||
| "postnew-version": "git add . && git commit -m \"v$npm_package_version\" -n", |
There was a problem hiding this comment.
The workflow is a little uneven in terms of what git commands are automatic (git add . && git commit ...) vs. manual (git checkout master && git fetch -p && git reset ...)
I'd probably err on the side of asking the user to do the git commands manually, at least at first; but it could go either way.
But I won't be a stickler about it.
There was a problem hiding this comment.
Yeah, it's kinda trickier than I would have hoped. The main problem is that we do not allow anyone to push directly to master unless they are a champion (which makes sense).
The assumption of yarn version and other patterns is that this ability is present. It also assumes that the tag is on the final commit for the version. In our case, this can also be a squashed commit from a pull request, not the original commit itself. That's why there is a slightly different flow for non-champions and champions and thus the usefulness of new-version.
| 1. For `patch`: `yarn new-version --patch` | ||
| 2. For `minor`: `yarn new-version --minor` | ||
| 3. For `major`: `yarn new-version --major` | ||
| 4. For other: `yarn new-version --new-version 3.4.11` |
There was a problem hiding this comment.
Using this pattern, there won't be any kind of tag attached to the version, right?
I think I see why that's necessary, I just want to make sure I understand it.
There was a problem hiding this comment.
Yes, with new-version it doesn't create the tag because otherwise, the tag will be on a commit that will be squashed from the PR and not exist in the master branch.
Adds
yarn new-versionThis calls
yarn version --no-git-tag-version, which doesn't create a tag, and then auto-commits the changes with the appropriate commit message. This will allow the ability to tag the squashed merge commit in themasterbranch instead of a commit squashed in a PR.Documents current workflow for releasing new versions of Rover for both Champions as non-Champions alike.