mirror of
https://github.com/TECHNOFAB11/bumpver.git
synced 2025-12-12 06:20:08 +01:00
check for vcs only if commit enabled
This commit is contained in:
parent
8d7b09e13d
commit
2f1d6aa2d2
1 changed files with 7 additions and 6 deletions
|
|
@ -214,12 +214,13 @@ def _assert_not_dirty(_vcs: vcs.VCS, filepaths: typ.Set[str], allow_dirty: bool)
|
||||||
|
|
||||||
def _bump(cfg: config.Config, new_version: str, allow_dirty: bool = False) -> None:
|
def _bump(cfg: config.Config, new_version: str, allow_dirty: bool = False) -> None:
|
||||||
_vcs: typ.Optional[vcs.VCS]
|
_vcs: typ.Optional[vcs.VCS]
|
||||||
|
|
||||||
try:
|
if cfg.commit:
|
||||||
_vcs = vcs.get_vcs()
|
try:
|
||||||
except OSError:
|
_vcs = vcs.get_vcs()
|
||||||
log.warning("Version Control System not found, aborting commit.")
|
except OSError:
|
||||||
_vcs = None
|
log.warning("Version Control System not found, aborting commit.")
|
||||||
|
_vcs = None
|
||||||
|
|
||||||
filepaths = set(cfg.file_patterns.keys())
|
filepaths = set(cfg.file_patterns.keys())
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue