-
Notifications
You must be signed in to change notification settings - Fork 7
Attach tags to the "release" commit that modifies the package.jsons #402
Comments
We can definitely add this, however to entertain an alternative (we can do either, or both): What if we skipped commits which contained "[skip ci]" in the commit message? This could also be customized via some sort of commit ignore pattern, similar to the |
@noahnu that's a great idea to have a way to skip certain commits when calculating the version strategy, i.e. have a pattern to ignore commits starting with |
@fmal The latest version of monodeploy should help. In your config file:
Docs: https://tophat.github.io/monodeploy/configuration/#schema-option-commitIgnorePatterns (due to limitations with the ajv schema validation, the config option only accepts strings not regexp objects) |
I have a Slack integration which posts the new packages (well, git tags) which were released. It is sometimes confusing to follow the git tag into GitHub and see that the package.json shows a different version number. So I would also be interested in this feature 👍 |
This should be fairly trivial to do. We'd just move this down to L39:
I wonder if this should become the default behaviour 🤔 . To prevent a breaking change for the moment, we can add some "releaseStrategy" / "tagStrategy" option |
@noahnu that sounds reasonable! But I need to look at what This does remind me, though: I am currently disabling monodeploy from automatically pushing. Instead, I iterate through the changeset and push tags myself, one-by-one, before pushing the release commit. This is because I have a GitHub integration that responds to new git tag events, and GitHub will not issue a webhook if more than 3 tags are pushed at a time. This feels like a separate issue, but the method name |
Would something like #415 help at all? |
@noahnu I suppose a "fixed" mode could solve this case, since everything gets bumped together, but I think independent mode makes more sense for my projects in the long run. I believe it should minimize unnecessary updates. BTW, I took a look at
This should result in
Does my proposal make sense? Allowing to configure this behavior in a clean way may be tricky. |
Yes that makes sense. To support configuration options, we could have createReleaseGitTags tag the previous commit if necessary. Though I'm starting to think we don't need to support configuration options here. We can make this the new behaviour. It'll be a breaking change, and we can batch it with some of the other breaking changes I had in mind. |
BREAKING CHANGE: Monodeploy no longer tags the commit containing the code changes, but rather tags the later commit which contains the package.json changes and other publish artifacts. This is more inline with how Lerna operates and means the tag will match the version in the package.json, as well as the changelog files. If there is interest in adding back the old behaviour behind a configuration option, please open a GitHub issue.
This will be out in monodeploy v3 which I'm working on: #452 |
BREAKING CHANGE: Monodeploy no longer tags the commit containing the code changes, but rather tags the later commit which contains the package.json changes and other publish artifacts. This is more inline with how Lerna operates and means the tag will match the version in the package.json, as well as the changelog files. If there is interest in adding back the old behaviour behind a configuration option, please open a GitHub issue.
Awesome! 🎉 |
Fixed in pre-release: https://github.com/tophat/monodeploy/releases/tag/monodeploy%403.0.0-rc.1 (wouldn't recommend using the pre-release though, will do a proper release as I wrap up some other changes) |
This is a follow-up issue after discussion in #292 (comment).
Currently monodeploy adds the release tags on the commit with the actual feature change / bug fix. In some cases (such as conventional changelog config that uses patch as a default strategy for other commit types) it's more desirable to have tags on the "release" commit that modifies the package.jsons.
This is also what lerna seems to be doing: lerna/lerna@4582c47
The text was updated successfully, but these errors were encountered: