git-tide 0.1.1__tar.gz → 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: git-tide
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: CLI for automated gitflow-style branching
5
5
  Author: Chad Dombrova
6
6
  Classifier: Programming Language :: Python :: 2
@@ -6,7 +6,7 @@ name = "git-tide"
6
6
  packages = [
7
7
  { include = "tide", from = "src" },
8
8
  ]
9
- version = "0.1.1"
9
+ version = "0.1.2"
10
10
  description = "CLI for automated gitflow-style branching"
11
11
  authors = ["Chad Dombrova", "Matt Collie"]
12
12
  readme = "README.md"
@@ -8,6 +8,7 @@ from pathlib import Path
8
8
 
9
9
  from .core import (
10
10
  is_url,
11
+ cz,
11
12
  get_tag_for_branch,
12
13
  get_modified_projects,
13
14
  get_projects,
@@ -284,7 +285,7 @@ def projects(modified: bool) -> None:
284
285
  click.echo(f"{project_name} = {project_dir}")
285
286
 
286
287
 
287
- @cli.command(name="next-tag")
288
+ @cli.command("get-tag")
288
289
  @click.option(
289
290
  "--path",
290
291
  default=".",
@@ -302,19 +303,23 @@ def projects(modified: bool) -> None:
302
303
  ),
303
304
  )
304
305
  @click.option(
305
- "--origin",
306
+ "--remote",
306
307
  default="origin",
307
308
  show_default=True,
308
309
  help="The git remote to use to when determining the next version.",
309
310
  )
310
- def next_tag(path: str, branch: str | None, remote: str) -> None:
311
+ @click.option("--next", "-n", is_flag=True, default=False)
312
+ def get_tag(path: str, branch: str | None, remote: str, next: bool) -> None:
311
313
  """
312
314
  Get the next tag.
313
315
  """
314
- if branch is None:
315
- runtime = get_runtime()
316
- branch = runtime.current_branch()
317
- click.echo(get_tag_for_branch(CONFIG, remote, branch, Path(path)))
316
+ if next:
317
+ if branch is None:
318
+ runtime = get_runtime()
319
+ branch = runtime.current_branch()
320
+ click.echo(get_tag_for_branch(CONFIG, remote, branch, Path(path)))
321
+ else:
322
+ click.echo(cz("version", "--project", folder=path))
318
323
 
319
324
 
320
325
  def main() -> None:
@@ -474,7 +474,7 @@ def cz(*args: str, folder: str | Path | None = None) -> str:
474
474
  text=True,
475
475
  cwd=folder,
476
476
  )
477
- return output
477
+ return output.strip()
478
478
 
479
479
 
480
480
  def is_pending_bump(config: Config, remote: str, branch: str, folder: Path) -> bool:
File without changes
File without changes
File without changes
File without changes