Replies: 5 comments 29 replies
-
@buehler that's a great idea, I haven't used it but the more we can automate the happier I would be. I'm very open to it. We haven't had the time to solidify our pipeline and automate this process. Because we're currently only building stacked based on our requirements it's always a code -> immediate release type thing, if the CI passes. With that said this would be a welcomed feature. I'm currently forking the AutoRoute package into our generator so we can have a Navigator2 implementation for users to choose from which turns out to have been a lot more work than expected. My time is a little locked up on that now in preparation for the new Flutter Web Series. I think having that setup and me hardening some of the tests we can definitely do that. One question is how does it choose the version number? I don't know much about the system. |
Beta Was this translation helpful? Give feedback.
-
Hey @FilledStacks Happy to explain :-) Semantic Versioning clearly states what needs to happen for the version number to change. They also support preview / release candidate / whatever you name it - releases (e.g. v1.0.0-prerelease.1). Most packaging systems adhere to this standard since it makes updating pretty easy. All non breaking changes (i.e. a major version increase) must be compatible. That said, semantic release makes use of that and removes the "human factor" in choosing an updated version number. I encountered the flaw myself when I needed to release a new version and was thinking about "is it really this or that?". Semantic release uses the Angular Conventional Commits standard to determine the next version number for the release. The three main parts of determining the new numbers are:
Examples:
The rest of the format can be reviewed in the aforementioned link to the conventional commits. We've been using this system for several years now and it makes releasing such a breeze. Adhering to this format not only allows you to select version numbers, but also automatically generates changelogs and release notes. You can review this in almost all of our smartive repositories. That said, a possible setup for stacked could be: Since mono-repos are not particularly well supported, split all the packages into separate repositories. This allows renovate bot (or dependabot...) to update dependencies in your packages one by one. So, if something in the core changes, all dependent packages get updated after the release as well. Use semantic release in all the sub packages, and if needed create a "master" repo that links to all other packages with git submodules (to have all the packages in one place). With that, all packages can be updated/developed on their own and are released when there are dependency-changes (renovate bot), or fixes/features/breaking changes. Nearly everything can be automated since you already have a premium stock of tests. The only two things you'd need for the automation would be:
I just created another automatically released package yesterday: https://github.com/smartive/flutter-generic-dropdown-widget which automatically releases with semantic release. I'd be happy to help you with the setup if you require assistance ;-) I hope I explained it in an understandable way |
Beta Was this translation helpful? Give feedback.
-
as far as I know, there are also github actions which check if the commit message is adhering to conventional commits. |
Beta Was this translation helpful? Give feedback.
-
Just came to my mind: another version of the automatic deployment, if you don't what to split the repository: leave all packages in one big mono-repo, but then, when something gets merged, ALL packages get deployed with the new version (e.g. https://github.com/buehler/dotnet-operator-sdk). So, all packages stick to the same versioning. There are pro's and con's to both versions. Personally I'd stick with the separated repos and the one master repo that uses submodules for development / testing the interaction between the packages. |
Beta Was this translation helpful? Give feedback.
-
@buehler the cli package is not auto publishing the version. When I look at the release logs it doesn't pick up that there are required changes. The commits start with feat or fix but it doesn't pick it up. I'll do a manual release for now because I need the version live to complete my tutorial. |
Beta Was this translation helpful? Give feedback.
-
Hey @ferrarafer and @FilledStacks
I don't know which versioning strategy you use in this repository, I just wanted to pitch an idea. In my other repositories, I use semantic versioning in combination with semantic-release. Do you know about the system and/or have you considered it?
As far as I know, it does not work well with mono-repos, but it does a pretty nice job at updating versioning numbers, changelogs, and the likes.
As an example: https://github.com/smartive/zitadel-dart
When the repository is updated, semantic release will determine the new version, update the pubspec and the changelog according to the commit message and then pushes the latest version to pub.dev. All fully automatically. You could even do pre-releases if configured.
Wdyt?
Beta Was this translation helpful? Give feedback.
All reactions