esm-tools / esm_version_checker

GNU General Public License v2.0
0 stars 0 forks source link

allow branch names and not just version numbers #4

Closed seb-wahl closed 4 years ago

seb-wahl commented 4 years ago

allow branch names and not just version numbers set --user flag for pip (required on blogin), doesn't hurt to have it everywhere else

pgierz commented 4 years ago

Could you put a usage example? I'll include it in the documentation

seb-wahl commented 4 years ago
esm_versions upgrade esm_environment=allow-source-workaround

or

esm_versions upgrade esm_environment=v4.0.1
seb-wahl commented 4 years ago

I could merge myself :-) but I did not for two reasons:

pgierz commented 4 years ago

Agreed on both points :-)

Check the setup.cfg for the bumpversion config:

[bumpversion]
current_version = 4.1.0
commit = True
tag = True

[bumpversion:file:setup.py]
search = version="{current_version}"
replace = version="{new_version}"

[bumpversion:file:esm_version_checker/__init__.py]
search = __version__ = "{current_version}"
replace = __version__ = "{new_version}"

If you just run bumpversion <major|minor|patch> in the top level, it'll take care of: 1) New version numbers in all relevant files 2) Tag with the new version number

I've been trying to follow semantic versioning for the version number scheme, so major for "breaking changes", minor for "new features" and patch for "bugfixes"

seb-wahl commented 4 years ago

I'll merge this now, as I need it to proceed with testing and porting to new machines. Otherwise I always have to "hack" e.g. esm-environments before I can start testing foci. With this update I can manage branches with esm_versions. I'm sure it's useful for others, too.

pgierz commented 4 years ago

Sorry for the delay, it was still on my list. I'll put your other PR in now.