Is there a tool people use for bumping release versions of apps? I mean the dance that one needs to do before every minor release of an app, where you edit the version in pubspec.yaml, and probably also change the version string in some Dart file, and then make a commit and add a tag that says something like "v1.0.234".

I got so bored by this that I made a tiny one-off tool for Knights of San Francisco. But there must be something out there, no?

#Flutter

@filiph melos does this for packages, but never tried with actual apps. We use it to manage versions automatically in the "plus' packages based on the commit message type.

@filiph for apps I create GitHub releases and the build system uses the release name as version name. The version code is simply the CI build number.

I still have to type the release name manually but the rest is automated. Ex: https://github.com/cachapa/tudo

An improvement could be specifying major and minor in the pubspec and having patch be the CI build number, e.g. pubspec says 2.5.0 and it's build 241 so you'd get v2.5.241.

That way you can just push to auto-release.

GitHub - cachapa/tudo: A simple to-do app

A simple to-do app. Contribute to cachapa/tudo development by creating an account on GitHub.

GitHub
@filiph I just leave pubspec alone and make a git tag. The CI system then uses this tag and compiles the app with build name and number arguments from it. Alternatively you just set the version name in the tag and auto increment build numbers, for example just use the GitHub build number for the job and so on …
@ben oooh, clever. Is the CI script that does the version change available somewhere?

@filiph no but splitting a tag like 1.0.0+123 apart could work like a this in a GitHub action:

- name: Get version and build number
run: |
VERSION=$(cut -d "+" -f1 <<< $GITHUB_REF_NAME)
echo "::set-output name=VERSION::${VERSION}"
BUILD=$(cut -d "+" -f2 <<< $GITHUB_REF_NAME)
echo "::set-output name=BUILD::${BUILD}"
id: version

@filiph Essentially splitting at the + sign. If you use build numbers from GitHub then this is not necessary.

You can then pipe the version name and build number to flutter build

flutter build ipa --build-name ${{ steps.version.outputs.VERSION }} --build-number ${{ steps.version.outputs.BUILD }}

@filiph we wrote an interactive release command that
1. collects PRs to write release notes, waits for your manual edits in vscode
2. Asks you if it is a major/minor/patch version
3. Inserts the release notes into Changelog
4. Bumps the version
5. Adds tags
6. Pushes release notes to github
7. pushes the release to pub.dev

https://github.com/phntmxyz/sidekick/blob/main/sk_sidekick/lib/src/commands/release_command.dart

sidekick/sk_sidekick/lib/src/commands/release_command.dart at main · phntmxyz/sidekick

Your personal CLI for your Flutter project. Contribute to phntmxyz/sidekick development by creating an account on GitHub.

GitHub