-
Notifications
You must be signed in to change notification settings - Fork 44
Description
I was actually going to start using a monorepo for a side project so I am considering how it would work in changie and how you might want to export or control the generated changelog. After reading your comment and thinking a little I actually think this would be a good feature, just need to find out how.
( I have rewritten the below content at least three times now... so don't take it too seriously yet )
My current thought process is a new config called something like "projects", name not set in stone of course. Your configuration would look something like:
projects:
# label is the label used in prompts for our selection, defaults to key if none specified
- label: UI
# key is used for file paths and version outputs
key: ui
# the changelog value here overrides the global value on a per project basis
changelog: ui/CHANGELOG.md
- label: Email Sender
key: email_sender
changelog: services/email/CHANGELOG.md
projectsVersionSeparator: "/"This configuration gives us the ability to create a changelog like stellar a fairly large monorepo with split changelogs. Internally the unreleased changes remain in the changes directory and release notes can also live there under the key per project. Like so
your_app/
├─ .changes/
│ ├─ unreleased/
│ │ ├─ whatever.yaml
│ ├─ email_sender/
│ │ ├─ v0.1.0.md
│ │ ├─ v0.2.0.md
│ ├─ ui/
│ │ ├─ v0.1.0.md
This would affect a few commands like you already mentioned with latest.
# new will stay the same and the first prompt will be the project
changie new
# but you can also include the project like with other values
changie new --project ui
# batch requires you to provide the project you are batching for
changie batch auto --project ui
changie batch auto # fails if projects are enabled, maybe in the future we can figure it out
# merge one project at a time
changie merge --project ui
# merging all projects is probably a safe action as well
changie merge
# latest and next both require a project
changie latest --project ui
changie next --project uiThe output of latest and next would be the following formula:
project key + project_version_separator + latest/next version
For example given the configuration above and versions in the example above the outputs would be:
$ changie latest --project email_sender
email_sender/v0.2.0
$ changie next patch --project ui
ui/v0.1.1Let me know your thoughts or if you have any questions on the design.
Originally posted by @miniscruff in #502 (reply in thread)
Another comment from discussion.
I think it would be best to develop and release this feature in a preview mode until any issues can be worked out, I have not done that for Changie before as all new features have always required a config change anyway. I do want to make sure the config changes and flow work well and feel good which I will have a hard time testing myself.
A base idea I have for that is simply displaying a warning prompt when using changie new and changie batch if projects are configured that they are in "preview mode" and mention that in the release notes until it is stable and good to go.
Other then that, its just a timing thing to get the work done.