jrl-cmakemodules-scripts 2.0.0__tar.gz → 2.1.0__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.4
2
2
  Name: jrl-cmakemodules-scripts
3
- Version: 2.0.0
3
+ Version: 2.1.0
4
4
  Summary: Release scripting tools for JRL CMake modules
5
5
  License: BSD-3-Clause
6
6
  Project-URL: homepage, https://github.com/jrl-umi3218/jrl-cmakemodules
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jrl-cmakemodules-scripts
3
- Version: 2.0.0
3
+ Version: 2.1.0
4
4
  Summary: Release scripting tools for JRL CMake modules
5
5
  License: BSD-3-Clause
6
6
  Project-URL: homepage, https://github.com/jrl-umi3218/jrl-cmakemodules
@@ -56,6 +56,7 @@ uv run --no-project jrl_release.py --bump patch --git-commit --git-tag
56
56
  | `--git-commit [MSG]` | Commit changes. Optional message (`{version}` placeholder). |
57
57
  | `--git-tag [NAME]` | Create a tag. Optional name (`{version}` placeholder). |
58
58
  | `--git-tag-message <MSG>` | Tag annotation (`{version}` placeholder). |
59
+ | `--sign-tag` | GPG-sign the tag (`git tag -s`). Needs a configured signing key. |
59
60
 
60
61
  **Git defaults**: commit `chore: bump version to {version}`, tag `v{version}`, tag message `Release version {version}`.
61
62
 
@@ -675,8 +676,13 @@ def git_tag_version(
675
676
  auto_confirm: bool,
676
677
  custom_tag_name: Optional[str] = None,
677
678
  custom_tag_message: Optional[str] = None,
679
+ sign: bool = False,
678
680
  ) -> bool:
679
- """Create a git tag for the version."""
681
+ """Create a git tag for the version.
682
+
683
+ When ``sign`` is True the tag is GPG-signed (``git tag -s``); otherwise an
684
+ annotated tag is created (``git tag -a``).
685
+ """
680
686
  success, _ = run_git_command(["rev-parse", "--git-dir"], root_dir)
681
687
  if not success:
682
688
  console.print(
@@ -708,11 +714,12 @@ def git_tag_version(
708
714
  console.print(f"[{STYLE_WARNING}]Git tag skipped.[/{STYLE_WARNING}]")
709
715
  return False
710
716
 
717
+ tag_flag = "-s" if sign else "-a"
711
718
  console.print(
712
- f"[{STYLE_MUTED}]$ git tag -a {tag_name} -m '{tag_message}'[/{STYLE_MUTED}]"
719
+ f"[{STYLE_MUTED}]$ git tag {tag_flag} {tag_name} -m '{tag_message}'[/{STYLE_MUTED}]"
713
720
  )
714
721
  success, output = run_git_command(
715
- ["tag", "-a", tag_name, "-m", tag_message], root_dir
722
+ ["tag", tag_flag, tag_name, "-m", tag_message], root_dir
716
723
  )
717
724
  if success:
718
725
  console.print(f"[{STYLE_SUCCESS}]✓ Created tag: {tag_name}[/{STYLE_SUCCESS}]")
@@ -1152,6 +1159,11 @@ def main():
1152
1159
  metavar="MESSAGE",
1153
1160
  help="Custom git tag message. Use {version} as placeholder for version number. Default: 'Release version {version}'",
1154
1161
  )
1162
+ parser.add_argument(
1163
+ "--sign-tag",
1164
+ action="store_true",
1165
+ help="GPG-sign the git tag (uses 'git tag -s' instead of '-a'). Requires a configured signing key (git config user.signingkey). Only meaningful with --git-tag.",
1166
+ )
1155
1167
  parser.add_argument(
1156
1168
  "--short",
1157
1169
  action="store_true",
@@ -1388,7 +1400,8 @@ def main():
1388
1400
  if args.git_tag_message
1389
1401
  else f"Release version {target_version}"
1390
1402
  )
1391
- git_lines.append(f"$ git tag -a {tag_name} -m '{tag_message}'")
1403
+ tag_flag = "-s" if args.sign_tag else "-a"
1404
+ git_lines.append(f"$ git tag {tag_flag} {tag_name} -m '{tag_message}'")
1392
1405
 
1393
1406
  show_dry_run_panel(dry_run_rows, pixi_lock_would_update, git_lines)
1394
1407
  sys.exit(0)
@@ -1402,6 +1415,11 @@ def main():
1402
1415
  f"[{STYLE_WARNING}]Warning: --git-tag used without --git-commit. The tag will point to the current HEAD, not the version bump commit.[/{STYLE_WARNING}]"
1403
1416
  )
1404
1417
 
1418
+ if args.sign_tag and args.git_tag is None:
1419
+ console.print(
1420
+ f"[{STYLE_WARNING}]Warning: --sign-tag has no effect without --git-tag.[/{STYLE_WARNING}]"
1421
+ )
1422
+
1405
1423
  if args.git_commit is not None:
1406
1424
  custom_message = None if args.git_commit is True else args.git_commit
1407
1425
  git_commit_version(
@@ -1420,6 +1438,7 @@ def main():
1420
1438
  args.confirm,
1421
1439
  custom_tag_name,
1422
1440
  args.git_tag_message,
1441
+ args.sign_tag,
1423
1442
  )
1424
1443
 
1425
1444
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "jrl-cmakemodules-scripts"
7
- version = "2.0.0"
7
+ version = "2.1.0"
8
8
  description = "Release scripting tools for JRL CMake modules"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"