diff --git a/CHANGES b/CHANGES index cc408204..322abd5a 100644 --- a/CHANGES +++ b/CHANGES @@ -19,6 +19,39 @@ $ pipx install --suffix=@next 'vcspull' --pip-args '\--pre' --force - _Add your latest changes from PRs here_ +## vcspull 1.11.5 (2022年04月20日) + +### Compatibility + +- `vcspull sync` accepts config file params via `--config`. Before it was only + `-c`. Assume myrepos.yaml in your path: + + ```console + $ vcspull sync --config myrepos.yaml + ``` + + (backport from vcspull v1.12.0b22) + +## vcspull 1.11.4 (2022年04月17日) + +### Compatibility + +- Allow click 8.1.x (backport of {issue}`#372`) + +## vcspull 1.11.3 (2022年04月11日) + +### Compatibility + +- vcspull learned `-h` for help (thanks HN 2022年04月11日) +- vcspull learned `-V` for version +- vcspull shows libvcs version with `-V` / `--version` + +## vcspull 1.11.2 (2022年03月21日) + +### Fix + +- Tab-completion for repository names and configurations + ## vcspull 1.11.1 (2022年03月12日) ### Security diff --git a/poetry.lock b/poetry.lock index 4487face..20c3c0f2 100644 --- a/poetry.lock +++ b/poetry.lock @@ -98,11 +98,11 @@ unicode_backport = ["unicodedata2"] [[package]] name = "click" -version = "8.0.4" +version = "8.1.2" description = "Composable command line interface toolkit" category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.dependencies] colorama = {version = "*", markers = "platform_system == \"Windows\""} @@ -867,7 +867,7 @@ test = [] [metadata] lock-version = "1.1" python-versions = "^3.7" -content-hash = "d315d3b5b0fe34a4802219c27fc35e60e4e0468d89ee1217a5ace82d8c05600a" +content-hash = "69c6dea339bbf888d60050f8e317bf198574dc2ea68d9bdc6376e4b6f891f5ab" [metadata.files] alabaster = [ @@ -924,8 +924,8 @@ charset-normalizer = [ {file = "charset_normalizer-2.0.12-py3-none-any.whl", hash = "sha256:6881edbebdb17b39b4eaaa821b438bf6eddffb4468cf344f09f89def34a8b1df"}, ] click = [ - {file = "click-8.0.4-py3-none-any.whl", hash = "sha256:6a7a62563bbfabfda3a38f3023a1db4a35978c0abd76f6c9605ecd6554d6d9b1"}, - {file = "click-8.0.4.tar.gz", hash = "sha256:8458d7b1287c5fb128c90e23381cf99dcde74beaf6c7ff6384ce84d6fe090adb"}, + {file = "click-8.1.2-py3-none-any.whl", hash = "sha256:24e1a4a9ec5bf6299411369b208c1df2188d9eb8d916302fe6bf03faed227f1e"}, + {file = "click-8.1.2.tar.gz", hash = "sha256:479707fe14d9ec9a0757618b7a100a0ae4c4e236fac5b7f80ca68028141a1a72"}, ] codecov = [ {file = "codecov-2.1.12-py2.py3-none-any.whl", hash = "sha256:585dc217dc3d8185198ceb402f85d5cb5dbfa0c5f350a5abcdf9e347776a5b47"}, diff --git a/pyproject.toml b/pyproject.toml index 1ef53f49..3eca1bbf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "vcspull" -version = "1.11.1" +version = "1.11.5" description = "synchronize your projects via yaml / json files" license = "MIT" authors = ["Tony Narlock "] @@ -42,7 +42,7 @@ vcspull = 'vcspull:cli.cli' [tool.poetry.dependencies] python = "^3.7" -click = ">=7<8.1" +click = ">=7<8.2" kaptan = "*" libvcs = "~0.11.1" colorama = ">=0.3.9" diff --git a/vcspull/__about__.py b/vcspull/__about__.py index 7868b65a..0ce2cae3 100644 --- a/vcspull/__about__.py +++ b/vcspull/__about__.py @@ -1,7 +1,7 @@ __title__ = "vcspull" __package_name__ = "vcspull" __description__ = "synchronize your projects via yaml / json files" -__version__ = "1.11.1" +__version__ = "1.11.5" __author__ = "Tony Narlock" __github__ = "https://github.com/vcs-python/vcspull" __docs__ = "https://vcspull.git-pull.com" diff --git a/vcspull/cli/__init__.py b/vcspull/cli/__init__.py index fed6f26b..19331427 100644 --- a/vcspull/cli/__init__.py +++ b/vcspull/cli/__init__.py @@ -8,6 +8,8 @@ import click +from libvcs.__about__ import __version__ as libvcs_version + from ..__about__ import __version__ from ..log import setup_logger from .sync import sync @@ -15,13 +17,18 @@ log = logging.getLogger(__name__) -@click.group() +@click.group(context_settings={"help_option_names": ["-h", "--help"]}) @click.option( "--log-level", default="INFO", help="Log level (DEBUG, INFO, WARNING, ERROR, CRITICAL)", ) -@click.version_option(version=__version__, message="%(prog)s %(version)s") +@click.version_option( + __version__, + "-V", + "--version", + message=f"%(prog)s %(version)s, libvcs {libvcs_version}", +) def cli(log_level): setup_logger(log=log, level=log_level.upper()) diff --git a/vcspull/cli/sync.py b/vcspull/cli/sync.py index 05b5842a..c43aa4cc 100644 --- a/vcspull/cli/sync.py +++ b/vcspull/cli/sync.py @@ -37,14 +37,14 @@ def get_repo_completions(ctx: click.core.Context, args, incomplete): if len(found_repos) == 0: found_repos = configs - return [o["name"] for o in found_repos if incomplete in o["name"]] + return [o["name"] for o in found_repos if o["name"].startswith(incomplete)] def get_config_file_completions(ctx, args, incomplete): return [ click.shell_completion.CompletionItem(c) for c in find_config_files(include_home=True) - if incomplete in c + if c.startswith(incomplete) ] @@ -69,6 +69,7 @@ def clamp(n, _min, _max): ) @click.option( "config", + "--config", "-c", type=click.Path(exists=True), help="Specify config",

AltStyle によって変換されたページ (->オリジナル) /