pkgmgr-kunrunic 0.1.2.dev0__tar.gz → 0.1.2.dev1__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.
Files changed (35) hide show
  1. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/PKG-INFO +1 -1
  2. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/pkgmgr/__init__.py +1 -1
  3. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/pkgmgr/config.py +8 -2
  4. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/pkgmgr/release.py +11 -4
  5. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/pkgmgr/templates/pkg.yaml.sample +1 -0
  6. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/pkgmgr/templates/pkgmgr.yaml.sample +3 -0
  7. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/pkgmgr_kunrunic.egg-info/PKG-INFO +1 -1
  8. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/LICENSE +0 -0
  9. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/README.md +0 -0
  10. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/pkgmgr/__main__.py +0 -0
  11. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/pkgmgr/cli.py +0 -0
  12. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/pkgmgr/collectors/__init__.py +0 -0
  13. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/pkgmgr/collectors/base.py +0 -0
  14. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/pkgmgr/collectors/checksums.py +0 -0
  15. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/pkgmgr/points.py +0 -0
  16. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/pkgmgr/shell_integration.py +0 -0
  17. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/pkgmgr/snapshot.py +0 -0
  18. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/pkgmgr/watch.py +0 -0
  19. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/pkgmgr_kunrunic.egg-info/SOURCES.txt +0 -0
  20. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/pkgmgr_kunrunic.egg-info/dependency_links.txt +0 -0
  21. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/pkgmgr_kunrunic.egg-info/entry_points.txt +0 -0
  22. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/pkgmgr_kunrunic.egg-info/not-zip-safe +0 -0
  23. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/pkgmgr_kunrunic.egg-info/requires.txt +0 -0
  24. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/pkgmgr_kunrunic.egg-info/top_level.txt +0 -0
  25. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/plugin/export_cksum.py +0 -0
  26. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/plugin/export_pkgstore.py +0 -0
  27. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/plugin/export_source_review.py +0 -0
  28. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/pyproject.toml +0 -0
  29. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/setup.cfg +0 -0
  30. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/tests/test_cli_install.py +0 -0
  31. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/tests/test_config.py +0 -0
  32. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/tests/test_progress.py +0 -0
  33. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/tests/test_release.py +0 -0
  34. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/tests/test_snapshot.py +0 -0
  35. {pkgmgr_kunrunic-0.1.2.dev0 → pkgmgr_kunrunic-0.1.2.dev1}/tools/echo_args.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pkgmgr-kunrunic
3
- Version: 0.1.2.dev0
3
+ Version: 0.1.2.dev1
4
4
  Summary: Package management workflow scaffold.
5
5
  Author: pkgmgr maintainers
6
6
  License: MIT License
@@ -13,4 +13,4 @@ __all__ = [
13
13
  "points",
14
14
  ]
15
15
 
16
- __version__ = "0.1.2.dev0"
16
+ __version__ = "0.1.2.dev1"
@@ -28,6 +28,7 @@ MAIN_TEMPLATE = """\
28
28
  pkg_release_root: ~/PKG/RELEASE
29
29
  git:
30
30
  repo_url: "https://github.com/org/repo"
31
+ keyword_prefix: "DEV-CODE:"
31
32
  sources:
32
33
  - /path/to/source-A
33
34
  - /path/to/source-B
@@ -106,7 +107,7 @@ collectors:
106
107
 
107
108
  MAIN_DEFAULTS = {
108
109
  "pkg_release_root": None,
109
- "git": {"repo_url": None},
110
+ "git": {"repo_url": None, "keyword_prefix": None},
110
111
  "sources": [],
111
112
  "source": {"exclude": []},
112
113
  "artifacts": {"root": None, "targets": [], "exclude": []},
@@ -206,7 +207,11 @@ def _validate_main_config(data):
206
207
 
207
208
  git_cfg = cfg.get("git") if isinstance(cfg.get("git"), dict) else {}
208
209
  repo_url = git_cfg.get("repo_url")
209
- cfg["git"] = {"repo_url": str(repo_url) if repo_url else None}
210
+ keyword_prefix = git_cfg.get("keyword_prefix")
211
+ cfg["git"] = {
212
+ "repo_url": str(repo_url) if repo_url else None,
213
+ "keyword_prefix": str(keyword_prefix) if keyword_prefix else None,
214
+ }
210
215
 
211
216
  cfg["sources"] = _ensure_list_of_strings(cfg.get("sources"), "sources")
212
217
  src = cfg.get("source") if isinstance(cfg.get("source"), dict) else {}
@@ -414,5 +419,6 @@ def describe_expected_fields():
414
419
  - env: key/value env overrides for that command only (optional)
415
420
  auto_actions: mapping of lifecycle events to action names (create_pkg/update_pkg/update_pkg_release/close_pkg)
416
421
  git.repo_url: base repository URL for commit links (per system)
422
+ git.keyword_prefix: commit prefix used with git.keywords (e.g. "DEV-CODE:")
417
423
  """
418
424
  ).strip()
@@ -475,8 +475,9 @@ def _git_output_encoding(repo_root):
475
475
  return "utf-8"
476
476
 
477
477
 
478
- def _collect_git_hits(pkg_cfg, pkg_root):
478
+ def _collect_git_hits(pkg_cfg, pkg_root, main_git_cfg=None):
479
479
  git_cfg = pkg_cfg.get("git") or {}
480
+ main_git_cfg = main_git_cfg or {}
480
481
  keywords = [str(k) for k in (git_cfg.get("keywords") or []) if str(k).strip()]
481
482
  result = {"keywords": keywords, "commits": []}
482
483
  files = set()
@@ -493,14 +494,19 @@ def _collect_git_hits(pkg_cfg, pkg_root):
493
494
  current = None
494
495
 
495
496
  output_encoding = _git_output_encoding(repo_root)
497
+ prefix = str(main_git_cfg.get("keyword_prefix") or "").strip()
498
+ prefix_re = re.escape(prefix) if prefix else ""
496
499
  for kw in keywords:
500
+ grep_kw = kw
501
+ if prefix_re:
502
+ grep_kw = "%s\\s*%s" % (prefix_re, re.escape(kw))
497
503
  cmd = [
498
504
  "git",
499
505
  "--no-pager",
500
506
  "log",
501
507
  "--name-only",
502
508
  "--pretty=format:%H\t%s",
503
- "--grep=%s" % kw,
509
+ "--grep=%s" % grep_kw,
504
510
  "--regexp-ignore-case",
505
511
  "--all",
506
512
  "--",
@@ -1349,8 +1355,9 @@ def update_pkg(cfg, pkg_id):
1349
1355
  if not os.path.exists(updates_dir):
1350
1356
  os.makedirs(updates_dir)
1351
1357
 
1352
- git_info, git_files = _collect_git_hits(pkg_cfg, pkg_dir)
1353
- repo_url = (cfg.get("git") or {}).get("repo_url")
1358
+ main_git_cfg = cfg.get("git") or {}
1359
+ git_info, git_files = _collect_git_hits(pkg_cfg, pkg_dir, main_git_cfg)
1360
+ repo_url = main_git_cfg.get("repo_url")
1354
1361
  if repo_url:
1355
1362
  git_info["repo_url"] = repo_url
1356
1363
  release_files = _collect_release_files(pkg_dir, pkg_cfg)
@@ -8,6 +8,7 @@ include:
8
8
 
9
9
  git:
10
10
  repo_root: null # optional override; default is git rev-parse from cwd
11
+ # keywords are matched against commit messages; prefix is configurable in pkgmgr.yaml (git.keyword_prefix)
11
12
  keywords: []
12
13
  since: null
13
14
  until: null
@@ -1,4 +1,7 @@
1
1
  pkg_release_root: ~/PKG/RELEASE
2
+ git:
3
+ repo_url: "https://github.com/org/repo"
4
+ keyword_prefix: "DEV-CODE:"
2
5
  sources:
3
6
  - /path/to/source-A
4
7
  - /path/to/source-B
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pkgmgr-kunrunic
3
- Version: 0.1.2.dev0
3
+ Version: 0.1.2.dev1
4
4
  Summary: Package management workflow scaffold.
5
5
  Author: pkgmgr maintainers
6
6
  License: MIT License