pkgmgr-kunrunic 0.1.1.dev1__tar.gz → 0.1.1.dev3__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 (39) hide show
  1. {pkgmgr_kunrunic-0.1.1.dev1/pkgmgr_kunrunic.egg-info → pkgmgr_kunrunic-0.1.1.dev3}/PKG-INFO +25 -13
  2. {pkgmgr_kunrunic-0.1.1.dev1 → pkgmgr_kunrunic-0.1.1.dev3}/README.md +24 -12
  3. {pkgmgr_kunrunic-0.1.1.dev1 → pkgmgr_kunrunic-0.1.1.dev3}/pkgmgr/__init__.py +1 -2
  4. {pkgmgr_kunrunic-0.1.1.dev1 → pkgmgr_kunrunic-0.1.1.dev3}/pkgmgr/cli.py +46 -30
  5. {pkgmgr_kunrunic-0.1.1.dev1 → pkgmgr_kunrunic-0.1.1.dev3}/pkgmgr/config.py +1 -1
  6. {pkgmgr_kunrunic-0.1.1.dev1 → pkgmgr_kunrunic-0.1.1.dev3}/pkgmgr/release.py +284 -33
  7. {pkgmgr_kunrunic-0.1.1.dev1 → pkgmgr_kunrunic-0.1.1.dev3}/pkgmgr/templates/pkgmgr.yaml.sample +1 -1
  8. {pkgmgr_kunrunic-0.1.1.dev1 → pkgmgr_kunrunic-0.1.1.dev3/pkgmgr_kunrunic.egg-info}/PKG-INFO +25 -13
  9. {pkgmgr_kunrunic-0.1.1.dev1 → pkgmgr_kunrunic-0.1.1.dev3}/pkgmgr_kunrunic.egg-info/SOURCES.txt +6 -2
  10. pkgmgr_kunrunic-0.1.1.dev3/pkgmgr_kunrunic.egg-info/top_level.txt +6 -0
  11. pkgmgr_kunrunic-0.1.1.dev3/plugin/export_cksum.py +354 -0
  12. pkgmgr_kunrunic-0.1.1.dev3/plugin/export_source_review.py +490 -0
  13. pkgmgr_kunrunic-0.1.1.dev3/test_data_root/plugin/export_cksum.py +354 -0
  14. pkgmgr_kunrunic-0.1.1.dev3/test_data_root/plugin/export_source_review.py +490 -0
  15. pkgmgr_kunrunic-0.1.1.dev3/tests/test_release.py +417 -0
  16. pkgmgr_kunrunic-0.1.1.dev3/tools/echo_args.py +15 -0
  17. pkgmgr_kunrunic-0.1.1.dev1/pkgmgr/gitcollect.py +0 -10
  18. pkgmgr_kunrunic-0.1.1.dev1/pkgmgr_kunrunic.egg-info/top_level.txt +0 -3
  19. pkgmgr_kunrunic-0.1.1.dev1/tests/test_release.py +0 -160
  20. {pkgmgr_kunrunic-0.1.1.dev1 → pkgmgr_kunrunic-0.1.1.dev3}/LICENSE +0 -0
  21. {pkgmgr_kunrunic-0.1.1.dev1 → pkgmgr_kunrunic-0.1.1.dev3}/pkgmgr/__main__.py +0 -0
  22. {pkgmgr_kunrunic-0.1.1.dev1 → pkgmgr_kunrunic-0.1.1.dev3}/pkgmgr/collectors/__init__.py +0 -0
  23. {pkgmgr_kunrunic-0.1.1.dev1 → pkgmgr_kunrunic-0.1.1.dev3}/pkgmgr/collectors/base.py +0 -0
  24. {pkgmgr_kunrunic-0.1.1.dev1 → pkgmgr_kunrunic-0.1.1.dev3}/pkgmgr/collectors/checksums.py +0 -0
  25. {pkgmgr_kunrunic-0.1.1.dev1 → pkgmgr_kunrunic-0.1.1.dev3}/pkgmgr/points.py +0 -0
  26. {pkgmgr_kunrunic-0.1.1.dev1 → pkgmgr_kunrunic-0.1.1.dev3}/pkgmgr/shell_integration.py +0 -0
  27. {pkgmgr_kunrunic-0.1.1.dev1 → pkgmgr_kunrunic-0.1.1.dev3}/pkgmgr/snapshot.py +0 -0
  28. {pkgmgr_kunrunic-0.1.1.dev1 → pkgmgr_kunrunic-0.1.1.dev3}/pkgmgr/templates/pkg.yaml.sample +0 -0
  29. {pkgmgr_kunrunic-0.1.1.dev1 → pkgmgr_kunrunic-0.1.1.dev3}/pkgmgr/watch.py +0 -0
  30. {pkgmgr_kunrunic-0.1.1.dev1 → pkgmgr_kunrunic-0.1.1.dev3}/pkgmgr_kunrunic.egg-info/dependency_links.txt +0 -0
  31. {pkgmgr_kunrunic-0.1.1.dev1 → pkgmgr_kunrunic-0.1.1.dev3}/pkgmgr_kunrunic.egg-info/entry_points.txt +0 -0
  32. {pkgmgr_kunrunic-0.1.1.dev1 → pkgmgr_kunrunic-0.1.1.dev3}/pkgmgr_kunrunic.egg-info/not-zip-safe +0 -0
  33. {pkgmgr_kunrunic-0.1.1.dev1 → pkgmgr_kunrunic-0.1.1.dev3}/pkgmgr_kunrunic.egg-info/requires.txt +0 -0
  34. {pkgmgr_kunrunic-0.1.1.dev1 → pkgmgr_kunrunic-0.1.1.dev3}/pyproject.toml +0 -0
  35. {pkgmgr_kunrunic-0.1.1.dev1 → pkgmgr_kunrunic-0.1.1.dev3}/setup.cfg +0 -0
  36. {pkgmgr_kunrunic-0.1.1.dev1 → pkgmgr_kunrunic-0.1.1.dev3}/tests/test_cli_install.py +0 -0
  37. {pkgmgr_kunrunic-0.1.1.dev1 → pkgmgr_kunrunic-0.1.1.dev3}/tests/test_config.py +0 -0
  38. {pkgmgr_kunrunic-0.1.1.dev1 → pkgmgr_kunrunic-0.1.1.dev3}/tests/test_progress.py +0 -0
  39. {pkgmgr_kunrunic-0.1.1.dev1 → pkgmgr_kunrunic-0.1.1.dev3}/tests/test_snapshot.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pkgmgr-kunrunic
3
- Version: 0.1.1.dev1
3
+ Version: 0.1.1.dev3
4
4
  Summary: Package management workflow scaffold.
5
5
  Author: pkgmgr maintainers
6
6
  License: MIT License
@@ -50,7 +50,7 @@ Dynamic: license-file
50
50
 
51
51
  # pkgmgr
52
52
 
53
- 패키지 관리/배포 워크플로를 위한 Python 패키지입니다. 현재는 스캐폴드 상태이며, CLI와 설정 템플릿, 릴리스 번들링까지 제공됩니다.
53
+ 패키지 관리/배포 워크플로를 위한 Python 패키지입니다. 현재는 패키지 단위 관리와 릴리스 번들링에 초점을 둔 초기 버전입니다.
54
54
 
55
55
  ## 디자인/Use case
56
56
  - 흐름 요약과 Mermaid 시퀀스 다이어그램은 [`design/mermaid/use-cases.md`](design/mermaid/use-cases.md)에 있습니다.
@@ -59,7 +59,7 @@ Dynamic: license-file
59
59
  ## 구성
60
60
  - `pkgmgr/cli.py` : CLI 엔트리 (아래 명령어 참조)
61
61
  - `pkgmgr/config.py` : `pkgmgr.yaml` / `pkg.yaml` 템플릿 생성 및 로더 (PyYAML 필요)
62
- - `pkgmgr/snapshot.py`, `pkgmgr/release.py`, `pkgmgr/gitcollect.py`, `pkgmgr/watch.py` : 스냅샷/패키지 수명주기/깃 수집/감시/릴리스 번들
62
+ - `pkgmgr/snapshot.py`, `pkgmgr/release.py`, `pkgmgr/watch.py` : 스냅샷/패키지 수명주기/감시/릴리스 번들
63
63
  - `pkgmgr/collectors/` : 컬렉터 인터페이스 및 체크섬 컬렉터 스텁
64
64
  - 템플릿: `pkgmgr/templates/pkgmgr.yaml.sample`, `pkgmgr/templates/pkg.yaml.sample`
65
65
 
@@ -72,7 +72,7 @@ Dynamic: license-file
72
72
  - 로컬/개발: 리포지토리 클론 후 `python -m pip install .` 또는 빌드 산출물(`dist/pkgmgr_kunrunic-<버전>-py3-none-any.whl`)을 `python -m pip install dist/<파일>`로 설치.
73
73
  - 확인: `pkgmgr --version` 혹은 `python -m pkgmgr.cli --version`.
74
74
 
75
- ## 기본 사용 흐름 (스캐폴드)
75
+ ## 기본 사용 흐름
76
76
  아래 명령은 `pkgmgr ...` 또는 `python -m pkgmgr.cli ...` 형태로 실행합니다.
77
77
  설정 파일 기본 위치는 `~/pkgmgr/pkgmgr.yaml`이며, `~/pkgmgr/pkgmgr*.yaml`과 `~/pkgmgr/config/pkgmgr*.yaml`을 자동 탐색합니다(여러 개면 선택 필요, `--config`로 강제 지정 가능). 상태/릴리스 데이터는 `~/pkgmgr/local/state` 아래에 기록됩니다.
78
78
 
@@ -102,13 +102,21 @@ pkgmgr create-pkg <pkg-id> [--config <path>]
102
102
  ```
103
103
  pkgmgr update-pkg <pkg-id> [--config <path>]
104
104
  ```
105
+ - 최신 릴리스 종료/아카이브: `pkgmgr update-pkg <pkg-id> --release` (tar 생성 후 `HISTORY/`로 이동).
105
106
  - Git: `git.repo_root`(상대/절대)에서 `git.keywords` 매칭 커밋을 모아 `message/author/subject/files/keywords` 저장.
106
107
  - 체크섬: 키워드에 걸린 파일 + `include.releases` 경로의 파일 해시 수집.
107
- - 릴리스 번들: `include.releases` 최상위 디렉터리별로 `release/<root>/release.vX.Y.Z/`를 자동 증가 버전으로 생성. 이전 버전과 해시가 동일한 파일은 스킵, 달라진 파일만 복사. 각 버전 폴더에 README.txt(포함/스킵 수, tar 예시, TODO) 작성. tar는 만들지 않음.
108
+ - 릴리스 번들: `include.releases` 최상위 디렉터리별로 `release/<root>/release.vX.Y.Z/`를 생성. `--release` 전까지는 최신 버전을 유지하며 변경분만 추가/덮어쓰기/삭제 반영(버전 증가 없음), 이전 버전과 해시가 동일한 파일은 스킵. 각 릴리스 폴더에 `PKG_NOTE`(1회 생성, 사용자 내용 유지)와 `PKG_LIST`(매번 갱신) 작성.
108
109
  - 실행 결과는 `~/pkgmgr/local/state/pkg/<id>/updates/update-<ts>.json`에 기록(`git`, `checksums`, `release` 메타 포함).
109
110
 
110
- ### (기타) watch / collect / actions / export / point
111
- 기능은 여전히 스텁 혹은 최소 구현 상태입니다. 필요 시 `pkgmgr watch`, `pkgmgr collect`, `pkgmgr actions`, `pkgmgr point`, `pkgmgr export`를 이용할 수 있으며, 추후 강화 예정입니다.
111
+ ### 5) actions — 외부 작업 실행
112
+ ```
113
+ pkgmgr actions
114
+ pkgmgr --config <path> actions <name> [args...]
115
+ ```
116
+ - 설정의 `actions`에 등록된 작업 목록을 출력하거나, 지정한 작업을 실행합니다.
117
+ - `<name>` 뒤의 모든 인자는 액션 커맨드에 그대로 전달됩니다.
118
+ - 예: `pkgmgr --config ~/pkgmgr/pkgmgr.yaml actions export_cksum --root R --time 4`
119
+ - 예: `pkgmgr --config ~/pkgmgr/pkgmgr.yaml actions export_cksum --pkg-dir /path/to/pkg --excel /path/to/template.xlsx`
112
120
 
113
121
  ## PATH/alias 자동 추가
114
122
  - PyPI/로컬 설치 후 `python -m pkgmgr.cli install`을 실행하면 현재 파이썬의 `bin` 경로(예: venv/bin, ~/.local/bin 등)를 감지해 사용 중인 쉘의 rc 파일에 PATH/alias를 추가합니다.
@@ -124,9 +132,9 @@ pkgmgr update-pkg <pkg-id> [--config <path>]
124
132
  - `sources`: 관리할 소스 경로 목록
125
133
  - `source.exclude`: 소스 스캔 제외 패턴 (glob 지원)
126
134
  - `artifacts.targets` / `artifacts.exclude`: 배포 대상 포함/제외 규칙 (glob 지원: `tmp/**`, `*.bak`, `**/*.tmp` 등)
127
- - `watch.interval_sec`: 감시 폴링 주기
128
- - `watch.on_change`: 변경 시 실행할 action 이름 리스트
129
- - `collectors.enabled`: 기본 활성 컬렉터
135
+ - `watch.interval_sec`: 감시 폴링 주기(향후 노출 예정)
136
+ - `watch.on_change`: 변경 시 실행할 action 이름 리스트(향후 노출 예정)
137
+ - `collectors.enabled`: 기본 활성 컬렉터(향후 확장 예정)
130
138
  - `actions`: action 이름 → 실행할 커맨드 목록 (각 항목에 `cmd` 필수, `cwd`/`env` 선택)
131
139
 
132
140
  - `pkgmgr/templates/pkg.yaml.sample` : 패키지별 설정 샘플
@@ -136,12 +144,16 @@ pkgmgr update-pkg <pkg-id> [--config <path>]
136
144
  - `collectors.enabled`: 패키지별 컬렉터 설정
137
145
 
138
146
  ## 주의
139
- - 아직 핵심 로직(스냅샷/감시/수집/내보내기)은 스텁입니다. 추후 단계적으로 구현/교체 예정입니다.
147
+ - 시스템 전체 관리(감시/수집/포인트) 기능은 아직 확장 단계입니다. 추후 단계적으로 구현/교체 예정입니다.
148
+
149
+ ## 확장성 가이드
150
+ - `actions`를 기본 확장 포인트로 사용합니다. 배포/내보내기/알림 등은 액션으로 위임하는 것을 권장합니다.
151
+ - 릴리스 번들 포맷(`release/<root>/release.vX.Y.Z/`, `PKG_LIST`, `PKG_NOTE`)은 외부 도구와의 연동 기준점으로 사용합니다.
152
+ - `~/pkgmgr/local/state/pkg/<id>/updates/update-<ts>.json`은 자동화 파이프라인에서 읽을 수 있는 결과물로 취급합니다.
153
+ - 전역 수집/집계는 `collectors` 확장으로 흡수할 계획이며, CLI로 노출하기 전까지는 내부 확장용으로 유지합니다.
140
154
 
141
155
  ## TODO (우선순위)
142
156
  - 감시/포인트 고도화: watchdog/inotify 연동, diff 결과를 포인트 메타에 기록, 에러/로그 처리.
143
157
  - baseline/릴리스 알림: baseline 대비 변경 감지 시 알림/확인 흐름 추가(README/README.txt TODO 반영).
144
- - Git 수집: `gitcollect.py` 확장(키워드/정규식 수집, state/pkg/<id>/commits.json 저장).
145
158
  - 컬렉터 파이프라인: 체크섬 외 collector 등록/선택/실행 로직, include 기준 실행, 정적/동적/EDR/AV 훅 자리 마련.
146
- - Export/산출물: `export` 기본 JSON 덤프, excel/word 후크 설계, 포인트 단위 산출물 묶기.
147
159
  - 테스트/CI: watch diff/포인트/라이프사이클 단위 테스트 추가, pytest/CI 스크립트 보강.
@@ -1,6 +1,6 @@
1
1
  # pkgmgr
2
2
 
3
- 패키지 관리/배포 워크플로를 위한 Python 패키지입니다. 현재는 스캐폴드 상태이며, CLI와 설정 템플릿, 릴리스 번들링까지 제공됩니다.
3
+ 패키지 관리/배포 워크플로를 위한 Python 패키지입니다. 현재는 패키지 단위 관리와 릴리스 번들링에 초점을 둔 초기 버전입니다.
4
4
 
5
5
  ## 디자인/Use case
6
6
  - 흐름 요약과 Mermaid 시퀀스 다이어그램은 [`design/mermaid/use-cases.md`](design/mermaid/use-cases.md)에 있습니다.
@@ -9,7 +9,7 @@
9
9
  ## 구성
10
10
  - `pkgmgr/cli.py` : CLI 엔트리 (아래 명령어 참조)
11
11
  - `pkgmgr/config.py` : `pkgmgr.yaml` / `pkg.yaml` 템플릿 생성 및 로더 (PyYAML 필요)
12
- - `pkgmgr/snapshot.py`, `pkgmgr/release.py`, `pkgmgr/gitcollect.py`, `pkgmgr/watch.py` : 스냅샷/패키지 수명주기/깃 수집/감시/릴리스 번들
12
+ - `pkgmgr/snapshot.py`, `pkgmgr/release.py`, `pkgmgr/watch.py` : 스냅샷/패키지 수명주기/감시/릴리스 번들
13
13
  - `pkgmgr/collectors/` : 컬렉터 인터페이스 및 체크섬 컬렉터 스텁
14
14
  - 템플릿: `pkgmgr/templates/pkgmgr.yaml.sample`, `pkgmgr/templates/pkg.yaml.sample`
15
15
 
@@ -22,7 +22,7 @@
22
22
  - 로컬/개발: 리포지토리 클론 후 `python -m pip install .` 또는 빌드 산출물(`dist/pkgmgr_kunrunic-<버전>-py3-none-any.whl`)을 `python -m pip install dist/<파일>`로 설치.
23
23
  - 확인: `pkgmgr --version` 혹은 `python -m pkgmgr.cli --version`.
24
24
 
25
- ## 기본 사용 흐름 (스캐폴드)
25
+ ## 기본 사용 흐름
26
26
  아래 명령은 `pkgmgr ...` 또는 `python -m pkgmgr.cli ...` 형태로 실행합니다.
27
27
  설정 파일 기본 위치는 `~/pkgmgr/pkgmgr.yaml`이며, `~/pkgmgr/pkgmgr*.yaml`과 `~/pkgmgr/config/pkgmgr*.yaml`을 자동 탐색합니다(여러 개면 선택 필요, `--config`로 강제 지정 가능). 상태/릴리스 데이터는 `~/pkgmgr/local/state` 아래에 기록됩니다.
28
28
 
@@ -52,13 +52,21 @@ pkgmgr create-pkg <pkg-id> [--config <path>]
52
52
  ```
53
53
  pkgmgr update-pkg <pkg-id> [--config <path>]
54
54
  ```
55
+ - 최신 릴리스 종료/아카이브: `pkgmgr update-pkg <pkg-id> --release` (tar 생성 후 `HISTORY/`로 이동).
55
56
  - Git: `git.repo_root`(상대/절대)에서 `git.keywords` 매칭 커밋을 모아 `message/author/subject/files/keywords` 저장.
56
57
  - 체크섬: 키워드에 걸린 파일 + `include.releases` 경로의 파일 해시 수집.
57
- - 릴리스 번들: `include.releases` 최상위 디렉터리별로 `release/<root>/release.vX.Y.Z/`를 자동 증가 버전으로 생성. 이전 버전과 해시가 동일한 파일은 스킵, 달라진 파일만 복사. 각 버전 폴더에 README.txt(포함/스킵 수, tar 예시, TODO) 작성. tar는 만들지 않음.
58
+ - 릴리스 번들: `include.releases` 최상위 디렉터리별로 `release/<root>/release.vX.Y.Z/`를 생성. `--release` 전까지는 최신 버전을 유지하며 변경분만 추가/덮어쓰기/삭제 반영(버전 증가 없음), 이전 버전과 해시가 동일한 파일은 스킵. 각 릴리스 폴더에 `PKG_NOTE`(1회 생성, 사용자 내용 유지)와 `PKG_LIST`(매번 갱신) 작성.
58
59
  - 실행 결과는 `~/pkgmgr/local/state/pkg/<id>/updates/update-<ts>.json`에 기록(`git`, `checksums`, `release` 메타 포함).
59
60
 
60
- ### (기타) watch / collect / actions / export / point
61
- 기능은 여전히 스텁 혹은 최소 구현 상태입니다. 필요 시 `pkgmgr watch`, `pkgmgr collect`, `pkgmgr actions`, `pkgmgr point`, `pkgmgr export`를 이용할 수 있으며, 추후 강화 예정입니다.
61
+ ### 5) actions — 외부 작업 실행
62
+ ```
63
+ pkgmgr actions
64
+ pkgmgr --config <path> actions <name> [args...]
65
+ ```
66
+ - 설정의 `actions`에 등록된 작업 목록을 출력하거나, 지정한 작업을 실행합니다.
67
+ - `<name>` 뒤의 모든 인자는 액션 커맨드에 그대로 전달됩니다.
68
+ - 예: `pkgmgr --config ~/pkgmgr/pkgmgr.yaml actions export_cksum --root R --time 4`
69
+ - 예: `pkgmgr --config ~/pkgmgr/pkgmgr.yaml actions export_cksum --pkg-dir /path/to/pkg --excel /path/to/template.xlsx`
62
70
 
63
71
  ## PATH/alias 자동 추가
64
72
  - PyPI/로컬 설치 후 `python -m pkgmgr.cli install`을 실행하면 현재 파이썬의 `bin` 경로(예: venv/bin, ~/.local/bin 등)를 감지해 사용 중인 쉘의 rc 파일에 PATH/alias를 추가합니다.
@@ -74,9 +82,9 @@ pkgmgr update-pkg <pkg-id> [--config <path>]
74
82
  - `sources`: 관리할 소스 경로 목록
75
83
  - `source.exclude`: 소스 스캔 제외 패턴 (glob 지원)
76
84
  - `artifacts.targets` / `artifacts.exclude`: 배포 대상 포함/제외 규칙 (glob 지원: `tmp/**`, `*.bak`, `**/*.tmp` 등)
77
- - `watch.interval_sec`: 감시 폴링 주기
78
- - `watch.on_change`: 변경 시 실행할 action 이름 리스트
79
- - `collectors.enabled`: 기본 활성 컬렉터
85
+ - `watch.interval_sec`: 감시 폴링 주기(향후 노출 예정)
86
+ - `watch.on_change`: 변경 시 실행할 action 이름 리스트(향후 노출 예정)
87
+ - `collectors.enabled`: 기본 활성 컬렉터(향후 확장 예정)
80
88
  - `actions`: action 이름 → 실행할 커맨드 목록 (각 항목에 `cmd` 필수, `cwd`/`env` 선택)
81
89
 
82
90
  - `pkgmgr/templates/pkg.yaml.sample` : 패키지별 설정 샘플
@@ -86,12 +94,16 @@ pkgmgr update-pkg <pkg-id> [--config <path>]
86
94
  - `collectors.enabled`: 패키지별 컬렉터 설정
87
95
 
88
96
  ## 주의
89
- - 아직 핵심 로직(스냅샷/감시/수집/내보내기)은 스텁입니다. 추후 단계적으로 구현/교체 예정입니다.
97
+ - 시스템 전체 관리(감시/수집/포인트) 기능은 아직 확장 단계입니다. 추후 단계적으로 구현/교체 예정입니다.
98
+
99
+ ## 확장성 가이드
100
+ - `actions`를 기본 확장 포인트로 사용합니다. 배포/내보내기/알림 등은 액션으로 위임하는 것을 권장합니다.
101
+ - 릴리스 번들 포맷(`release/<root>/release.vX.Y.Z/`, `PKG_LIST`, `PKG_NOTE`)은 외부 도구와의 연동 기준점으로 사용합니다.
102
+ - `~/pkgmgr/local/state/pkg/<id>/updates/update-<ts>.json`은 자동화 파이프라인에서 읽을 수 있는 결과물로 취급합니다.
103
+ - 전역 수집/집계는 `collectors` 확장으로 흡수할 계획이며, CLI로 노출하기 전까지는 내부 확장용으로 유지합니다.
90
104
 
91
105
  ## TODO (우선순위)
92
106
  - 감시/포인트 고도화: watchdog/inotify 연동, diff 결과를 포인트 메타에 기록, 에러/로그 처리.
93
107
  - baseline/릴리스 알림: baseline 대비 변경 감지 시 알림/확인 흐름 추가(README/README.txt TODO 반영).
94
- - Git 수집: `gitcollect.py` 확장(키워드/정규식 수집, state/pkg/<id>/commits.json 저장).
95
108
  - 컬렉터 파이프라인: 체크섬 외 collector 등록/선택/실행 로직, include 기준 실행, 정적/동적/EDR/AV 훅 자리 마련.
96
- - Export/산출물: `export` 기본 JSON 덤프, excel/word 후크 설계, 포인트 단위 산출물 묶기.
97
109
  - 테스트/CI: watch diff/포인트/라이프사이클 단위 테스트 추가, pytest/CI 스크립트 보강.
@@ -9,9 +9,8 @@ __all__ = [
9
9
  "config",
10
10
  "snapshot",
11
11
  "release",
12
- "gitcollect",
13
12
  "watch",
14
13
  "points",
15
14
  ]
16
15
 
17
- __version__ = "0.1.1.dev1"
16
+ __version__ = "0.1.1.dev3"
@@ -9,7 +9,7 @@ try:
9
9
  except Exception:
10
10
  argparse = None
11
11
 
12
- from . import config, snapshot, release, gitcollect, watch, __version__
12
+ from . import config, snapshot, release, watch, __version__
13
13
 
14
14
 
15
15
  def _add_make_config(sub):
@@ -45,12 +45,12 @@ def _add_snapshot(sub):
45
45
  p.set_defaults(func=_handle_snapshot)
46
46
 
47
47
  def _add_actions(sub):
48
- p = sub.add_parser("actions", help="run one or more configured actions")
49
- p.add_argument("names", nargs="+", help="action names to run")
48
+ p = sub.add_parser("actions", help="list actions or run a configured action")
49
+ p.add_argument("name", nargs="?", help="action name to run (omit to list)")
50
50
  p.add_argument(
51
- "--config",
52
- default=None,
53
- help="config file path (default: auto-discover under %s)" % config.BASE_DIR,
51
+ "action_args",
52
+ nargs=argparse.REMAINDER,
53
+ help="args passed to the action (everything after the name)",
54
54
  )
55
55
  p.set_defaults(func=_handle_actions)
56
56
 
@@ -69,6 +69,12 @@ def _add_create_pkg(sub):
69
69
  def _add_update_pkg(sub):
70
70
  p = sub.add_parser("update-pkg", help="collect git keyword hits and checksums for a pkg")
71
71
  p.add_argument("pkg_id", help="package identifier to update")
72
+ p.add_argument(
73
+ "-release",
74
+ "--release",
75
+ action="store_true",
76
+ help="finalize the latest release bundle (tar + move to HISTORY)",
77
+ )
72
78
  p.add_argument(
73
79
  "--config",
74
80
  default=None,
@@ -152,37 +158,28 @@ def _add_point(sub):
152
158
  p.set_defaults(func=_handle_point)
153
159
 
154
160
 
155
- def _add_export(sub):
156
- p = sub.add_parser("export", help="export pkg data (excel/word/etc)")
157
- p.add_argument("--pkg", required=True, help="package identifier")
158
- p.add_argument("--format", choices=["excel", "word", "json"], required=True)
159
- p.add_argument(
160
- "--config",
161
- default=None,
162
- help="config file path (default: auto-discover under %s)" % config.BASE_DIR,
163
- )
164
- p.set_defaults(func=_handle_export)
165
-
166
-
167
161
  def build_parser():
168
162
  if argparse is None:
169
163
  raise RuntimeError("argparse not available; install argparse")
170
- parser = argparse.ArgumentParser(prog="pkgmgr", description="Pkg manager CLI scaffold")
164
+ parser = argparse.ArgumentParser(
165
+ prog="pkgmgr",
166
+ description="Pkg manager CLI v%s" % __version__,
167
+ )
171
168
  # keep %(prog)s for argparse's mapping and append package version
172
169
  parser.add_argument("-V", "--version", action="version", version="%(prog)s " + __version__)
170
+ parser.add_argument(
171
+ "--config",
172
+ default=None,
173
+ help="config file path (default: auto-discover under %s)" % config.BASE_DIR,
174
+ )
173
175
  sub = parser.add_subparsers(dest="command")
174
176
 
175
177
  _add_make_config(sub)
176
178
  _add_install(sub)
177
- _add_snapshot(sub)
178
179
  _add_create_pkg(sub)
179
180
  _add_update_pkg(sub)
180
181
  _add_close_pkg(sub)
181
- _add_watch(sub)
182
- _add_collect(sub)
183
- _add_export(sub)
184
182
  _add_actions(sub)
185
- _add_point(sub)
186
183
  return parser
187
184
 
188
185
 
@@ -227,6 +224,9 @@ def _handle_create_pkg(args):
227
224
 
228
225
  def _handle_update_pkg(args):
229
226
  cfg = config.load_main(args.config)
227
+ if args.release:
228
+ release.finalize_pkg_release(cfg, args.pkg_id)
229
+ return 0
230
230
  release.update_pkg(cfg, args.pkg_id)
231
231
  return 0
232
232
 
@@ -255,16 +255,32 @@ def _handle_collect(args):
255
255
  return 0
256
256
 
257
257
 
258
- def _handle_export(args):
258
+ def _handle_actions(args):
259
259
  cfg = config.load_main(args.config)
260
- release.export_pkg(cfg, args.pkg, args.format)
260
+ if not args.name:
261
+ actions = cfg.get("actions", {}) or {}
262
+ if not actions:
263
+ print("[actions] no actions configured")
264
+ return 0
265
+ _print_actions(actions)
266
+ return 0
267
+ release.run_actions(
268
+ cfg, [args.name], extra_args=args.action_args, config_path=args.config
269
+ )
261
270
  return 0
262
271
 
263
272
 
264
- def _handle_actions(args):
265
- cfg = config.load_main(args.config)
266
- release.run_actions(cfg, args.names)
267
- return 0
273
+ def _print_actions(actions):
274
+ ordered = sorted(actions.keys())
275
+ print("[actions] available:")
276
+ for idx, name in enumerate(ordered, 1):
277
+ entries = actions.get(name) or []
278
+ if isinstance(entries, dict):
279
+ count = 1
280
+ else:
281
+ count = len(entries)
282
+ print(" %d) %s (%d command(s))" % (idx, name, count))
283
+ return ordered
268
284
 
269
285
  def _handle_point(args):
270
286
  cfg = config.load_main(args.config)
@@ -63,7 +63,7 @@ collectors:
63
63
  actions:
64
64
  # action_name: list of commands (cmd required, cwd/env optional)
65
65
  export_cksum:
66
- - cmd: python cksum_excel.py
66
+ - cmd: python export_cksum.py --pkg-dir /path/to/pkg --excel /path/to/template.xlsx
67
67
  cwd: /app/script
68
68
  env: { APP_ENV: dev }
69
69
  export_world_dev: