Closed iaindillingham closed 3 years ago
Couple of responses...
Makefile
or scripts/bump
because I think these should be protected; any changes should cascade from python-action-template
. We take a similar approach to study repositories and research-template
WRT the .workflows
and .vscode
directories.bumpversion
bumps the version string in .bumpversion.cfg
by default. It will also always write current_version
to this file, whether the current version originated here or on the command line. I've just double-checked and, annoyingly, bumpversion
also obliterates the comments 😢 And some questions...
Does the confusing part relate to understanding where the canonical version string is stored? In which case, it's stored in action/VERSION
as command line configuration takes precedence over .bumpversion.cfg
configuration. We're incrementing the version strings in README.md as a convenience and in .bumpversion.cfg
as a necessity (see above).
Or to whether version strings will be out-of-sync? In which case they won't: make bump
will update them everywhere, commit the changes, and create a tag.
Or to whether version strings matter? In which case, not to job-runner: only tags matter to job-runner. But it's fiddly to extract a version string from a tag. Even then, we'd still like to commit the latest version string to README.md
to reduce copy-paste errors.
Or to having configuration split between Makefile
and .bumpversion.cfg
? In which case, this isn't limited to version bumping; the same is true of anything where local configuration may diverge from global configuration, such as Mypy, flake8, isort etc. It's useful for changes to cascade, though. (And we do this elsewhere too; changes to Justfiles, for example.)
Or something else?
I think the confusing part relates to 1. but I think the problem is over-constrained:
Makefile
or scripts/bump
.bumpversion.cfg
.bumpversion.cfg
(because we can't; bumpversion
obliterates the comments) and we don't want to comment Makefile
or scripts/bump
directlyHow about incorporating .bumpversion.cfg
into python-action-template
and not passing the current version via the command line?
Yes, it's mostly 1, with a bit of 2 and 4.
Knowing that the version in .bumpversion.cfg
gets bumped relieves most of my concern.
I think your suggestion of adding .bumpversion.cfg
to the template is an excellent one and would completely pacify me. Could you even include a commented-out version of the [bumpversion:file:<some-file>]
directive to show people how it's done?
Thanks @benbc. I've commented both in this repo's and python-action-template
's .bumpversion.cfg
.
Anyone copying-and-pasting from README.md will always copy-and-paste the latest version of safetab.