peritus / bumpversion

Version-bump your software with a single command
https://pypi.python.org/pypi/bumpversion
MIT License
1.5k stars 148 forks source link

bumpversion --no-tag --no-commit still tries to tag and commit if configuration file has this defined as true #156

Open fizyk opened 7 years ago

fizyk commented 7 years ago
bumpversion --no-tag --no-commit --new-version 5.17.1-126-g2e7ef81 . --allow-dirty --dry-run --verbose
Reading config file .bumpversion.cfg:
[bumpversion]
commit = True
tag = True
message = Release {new_version}
current_version = 5.17.1
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)((?P<prerelease>.*))?
serialize =
    {major}.{minor}.{patch}{prerelease}
    {major}.{minor}.{patch}

[bumpversion:file:doublevision/version.py]

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

[bumpversion:file:package.json]
search = "version": "{current_version}"
replace = "version": "{new_version}"

[bumpversion:file:CHANGES.md]
search = ### Version unreleased
replace = ### Version {new_version}

Parsing version '5.17.1' using regexp '(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)((?P<prerelease>.*))?'
Parsed the following values: major=5, minor=17, patch=1, prerelease=0
Attempting to increment part '.'
Values are now: major=5, minor=17, patch=1, prerelease=0
Dry run active, won't touch any files.
Parsing version '5.17.1-126-g2e7ef81' using regexp '(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)((?P<prerelease>.*))?'
Parsed the following values: major=5, minor=17, patch=1, prerelease=-126-g2e7ef81
New version will be '5.17.1-126-g2e7ef81'
Asserting files doublevision/version.py, setup.py, package.json, CHANGES.md contain the version string:
Found '5.17.1' in doublevision/version.py at line 2: __version__ = '5.17.1'
Found 'version='5.17.1'' in setup.py at line 171:     version='5.17.1',
Found '"version": "5.17.1"' in package.json at line 2:   "version": "5.17.1",
Found '5.17.1' in CHANGES.md at line 3: ### Version 5.17.1 ([JIRA](https://doublevision.atlassian.net/browse/DB-9339)) ###
Would change file doublevision/version.py:
--- a/doublevision/version.py
+++ b/doublevision/version.py
@@ -1,6 +1,6 @@
 """doublevision package version definition."""

-__version__ = '5.17.1'
+__version__ = '5.17.1-126-g2e7ef81'
 # 'ansible_version' is set during doublevisionrtb package build in ansible:
 ansible_version = None  # type: str
 # 'commit' is set during doublevisionrtb package build in ansible:
Would change file setup.py:
--- a/setup.py
+++ b/setup.py
@@ -169,7 +169,7 @@

 setup(
     name='doublevision',
-    version='5.17.1',
+    version='5.17.1-126-g2e7ef81',
     author='Doublevision',
     author_email='thearoom@clearcode.cc',
     url='https://bitbucket.org/doublevision/doublevisionrtb/',
Would change file package.json:
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "doublevision-ui",
-  "version": "5.17.1",
+  "version": "5.17.1-126-g2e7ef81",
   "devDependencies": {
     "babel-preset-es2015": "6.3.13",
     "babel-preset-react": "6.3.13",
Would change file CHANGES.md:
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,7 +1,7 @@
 CHANGES
 =======

-### Version 5.17.1 ([JIRA](https://doublevision.atlassian.net/browse/DB-9339)) ###
+### Version ### Version 5.17.1-126-g2e7ef81 ([JIRA](https://doublevision.atlassian.net/browse/DB-9339)) ###

 * [Ticket DB-9335](https://doublevision.atlassian.net/browse/DB-9335) - OpenX exchange is not selected by default in create target group form.

Would write to config file .bumpversion.cfg:
[bumpversion]
commit = True
tag = True
message = Release {new_version}
current_version = 5.17.1-126-g2e7ef81
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)((?P<prerelease>.*))?
serialize = 
    {major}.{minor}.{patch}{prerelease}
    {major}.{minor}.{patch}

[bumpversion:file:doublevision/version.py]

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

[bumpversion:file:package.json]
search = "version": "{current_version}"
replace = "version": "{new_version}"

[bumpversion:file:CHANGES.md]
search = ### Version unreleased
replace = ### Version {new_version}

Would prepare Git commit
Would add changes in file 'doublevision/version.py' to Git
Would add changes in file 'setup.py' to Git
Would add changes in file 'package.json' to Git
Would add changes in file 'CHANGES.md' to Git
Would add changes in file '.bumpversion.cfg' to Git
Would commit to Git with message 'Release 5.17.1-126-g2e7ef81'
Would tag 'v5.17.1-126-g2e7ef81' in Git