mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-15 18:11:48 +04:00
Add pre-commit autoupdate --semver
This chooses the latest version according to semantic versioning. Prereleases are only chosen if `--semver-prerelease` is also specified.
This commit is contained in:
parent
cb0bcfd67f
commit
880616df3e
5 changed files with 271 additions and 62 deletions
|
|
@ -44,7 +44,10 @@ def test_gc(tempdir_factory, store, in_git_dir, cap_out):
|
|||
|
||||
# update will clone both the old and new repo, making the old one gc-able
|
||||
install_hooks(C.CONFIG_FILE, store)
|
||||
assert not autoupdate(C.CONFIG_FILE, store, freeze=False, tags_only=False)
|
||||
assert not autoupdate(
|
||||
C.CONFIG_FILE, store, freeze=False, tags_only=False,
|
||||
semver=False, semver_stable_only=False,
|
||||
)
|
||||
|
||||
assert _config_count(store) == 1
|
||||
assert _repo_count(store) == 2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue