Separate local release actions from publishing #1965
Replies: 2 comments 3 replies
-
I think the flags you describe are cool but hard with the current code. I feel like you em use case could mostly be covered with the afterVersion hook in the exec plugin. Have your thoughts changed at all since writing a plugin? |
Beta Was this translation helpful? Give feedback.
-
(separate thread, since it's a more general topic)
To be honest, I spent much more time than I expected for writing the plugin. There is a lot of code duplication, all git tag/push logic is replicated in each publishing plugin. See the last part of my comment here on this topic. Having a plugin system is great and was the main attraction point for me. But I really don't see the advertised "each command only does one thing really well". In reality, it's more of a monolith release process with the ability to hook into it and do some extra things on the way. But then again, several publishing plugins can all hook in together and will create a mess because they don't interplay well. Maybe if those hooks were exposed as the release steps that can be run from the CLI, it would be more flexible? 🤔 (just thinking aloud) If the usage described above was possible, I wouldn't need any new plugins at all for any of my use cases: |
Beta Was this translation helpful? Give feedback.
-
First a concrete use case: I want to run Auto with the
git-tag
plugin, but I need to do things after the tag is created, but before it is pushed. Similar to the setup withexec
plugin I mentioned here, but this time my actions don't fit in a single script that I can call fromexec
.I see that
git-tag
plugin bumps the version and creates a tag in theversion
hook and pushes it in thepublish
hook. But how can I trigger these hooks from the CLI? I want to do this:auto.hooks.version
auto.hooks.publish
Unintuitively,
auto version
is not related to theauto.hooks.version
in the code, so callingauto version
tells me, e.g.patch
, but doesn't create the tag locally. Even if I get the version by runningauto latest --dry-run --quiet
and create the tag manually (as a workaround), how do I call theauto.hooks.publish
from the CLI?More generally: is it possible to do a release preparation (all local actions) separately from the publishing/pushing those changes? Something like
And if it's not possible at the moment, can this be implemented with the current Auto architecture? I would be glad to contribute it, if you can give me some pointers 🙂
P.S. motivation for this:
(quoting docs) and my comment here: #917 (comment).
I need to publish two different kinds of artifacts from the same project (not npm, not a monorepo), versioning is simple and is based on git tags and git describe (for canaries), so I don't really need publishing plugins and would be happy with the
git-tag
plugin, if the functionality described above was supported: bump version, create tag, do my custom publishing, push the tag, publish GitHub release, etc.Having this would actually eliminate the need to write plugins for those use-cases where there is no manifest file with the version value: sbt, Docker, GitHub Actions, custom artifact upload, etc.
Beta Was this translation helpful? Give feedback.
All reactions