Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Post-bump callback #4

Open
passsy opened this issue Mar 14, 2023 · 0 comments
Open

Add Post-bump callback #4

passsy opened this issue Mar 14, 2023 · 0 comments

Comments

@passsy
Copy link
Contributor

passsy commented Mar 14, 2023

Besides the version in pubspec.yaml, I also want to bump the version in my README.md. It would be great if the BumpVersionCommand would provide a callback allowing me to add my custom logic

..addCommand(
  BuildVersionCommand(
    afterBump: (oldVersion, newVersion) {
      final readme = SidekickContext.projectRoot.file('README.md');
      readme.replaceFirst(oldVersion, newVersion);
    }
  ),
);

It's unclear to me how to connect it with --commit because it doesn't know about my changed file. Most likely it doesn't work out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant