Open Anthony-Jhoiro opened 1 year ago
here an idea to test with:
semantic-release (https://github.com/semantic-release/semantic-release) can define you own release cycle by using some modules that fulfil all steps of a release (https://github.com/semantic-release/semantic-release#release-steps)
for each steps semantic-release provide a bunch of plugins with, for some of them, many configuration possible.
for the step analyzeCommits
the plugins commit-analyzer
(https://github.com/semantic-release/commit-analyzer) can be set-up with configurations on scope
and release
kind.
https://github.com/semantic-release/commit-analyzer#releaserules
Therefor, it should be possible to accomplish a solution that fit your need.
Thanks for your answer @lavazais-sylvain! I did a small POC to test this. This was my process:
nx show projects --affected
and nx show project [project-name] --json
. Both commands allows to get all projects affected in a release and their associated tags.analyzeCommits
export that uses the semantic-release-gitmoji
to support gitmojis and know if a release is needed.scope:core
has been updated. If yes, do a major, minor or patch release. Otherwise, do a prerelease
.In paper, this should be working fine, this is the resulting code
.release.js
./custom-plugin.js
The resulting issue is that semantic-release restrict commitAnalyzer plugins to only return major, minor, and patch release and not prerelease... So it returns an error
I didn't try with a scope and the karma-commit convention yet but the limitation is hard-coded in the semantic-release code, so it does not seem possible to use it to handle pre-release this way. It allows pre-release but only for branches wich I don't think is well suited for the problem
Release Management
To make the Selflow project usable by most, a string release system to track changes is required.
This repository is a monorepo that contains the code of multiple applications, plugins, libraries, and core libraries. They should share the same release cycle because they are all part of the Selflow ecosystem, and it can help track the updates.
This issue is still a draft, but I am already open to your feedbacks
Requirements:
These requirements can be subject to change if better ideas are suggested !
scope:core
on the main projects/libs.I am, of course, open to suggestions!
Draft ideas:
semantic-release
seems too limited to fit these needs (https://github.com/selflow/selflow/issues/53#issuecomment-1793392398)nx show projects --affected
andnx show project [project-name] --json
, which can be used to know if the changes in the release affect main projects. If you are unfamiliar with nx, you can use this commandyarn -s nx show projects --affected | xargs -I % bash -c "yarn -s nx show project % --json" | jq -n '[ inputs.tags ]'
Tools to test