stone/v0.3.3 #670

Merged
fuzzy merged 25 commits from stone/v0.3.3 into main 2026-06-19 21:47:24 +00:00
Owner
No description provided.
# Previous message:
Phase 1: create command registry structure

Closes #0535, #0532, #0533, #0534

- Add internal/registry package with Command type supporting:
  - Name-to-handler mapping via Register()
  - Recursive subcommand dispatch via Dispatch()
  - Aliases via Alias()
- Refactor cmd/tpkg/main.go to use registry instead of flat switch
- Add --version global flag support
- Add aliases: ls->list, rm->remove, up->update, in->install
docs: fix roadmap formatting and indentation issues
All checks were successful
Test and Release / test (pull_request) Successful in 2m32s
Test and Release / lint (pull_request) Successful in 3m17s
827059c607
fuzzy changed title from stone/v0.3.3 to WIP: stone/v0.3.3 2026-06-19 19:05:58 +00:00
This commit introduces a complete help infrastructure with consistent formatting across all commands. Key changes include:
- Added structured help output with usage, description, subcommands, and examples
- Implemented --help and -h flag support for all commands
- Enhanced command registry with proper help printing and path resolution
- Added examples to root command and improved command descriptions
- Updated version handling to use constant instead of hardcoded string
- Improved command dispatch logic to handle help flags and aliases
- Added usage examples to main command and improved error handling
The changes make tpkg's help system consistent and user-friendly across all subcommands while maintaining backward compatibility.

# Previous message:
Phase 2: implement consistent help formatting and help text structure

Closes #0539, #0545, #0536, #0537, #0538, #0540, #0541, #0542, #0543, #0544

- Enhance registry with structured help output (usage, description,
  subcommands, examples sections)
- Add --help and -h interception at all command levels
- Hide aliases from help listing
- Add help text structure with usage line, description, subcommand
  listing, flags, and examples
- Update repo, cache, config, key, rollback to handle --help natively
- Add global flags (--config, --version) to root help output
feat: add version output to help and version commands
All checks were successful
Test and Release / lint (pull_request) Successful in 1m39s
Test and Release / test (pull_request) Successful in 2m10s
e7a61d949d
# Previous message:
Phase 2: add version information in help output

Closes #0548, #0546, #0547

- tpkg version now outputs program version string before package info
- tpkg --version prints version and exits
- Define progVersion constant in main.go
This commit implements the repo command group feature by:
- Adding new subcommands: index, mirror, and verify to the repo command
- Updating the usage message to include the new subcommands
- Adding the new subcommand handlers to the command switch statement
- Marking the related issues as complete in the roadmap
The changes allow users to run commands like `tpkg repo index`, `tpkg repo mirror`, and `tpkg repo verify` to manage repository indexes, mirror repositories, and verify packages respectively.

# Previous message:
Phase 3: implement repo as command group

Closes #0556, #0549, #0550, #0551, #0552, #0553, #0554, #0555

- Add repo index, repo mirror, repo verify as subcommands of repo
- Flat forms (repo-index, repo-mirror, repo-verify) retained for backward compat
# Previous message:
Phase 3: implement verify as command group

Closes #0561, #0557, #0558, #0559, #0560

- Create verify command group with subcommands: package, files, installed, all
- Rename runVerify to runVerifyPackage for GPG signature verification
- Add dispatch function in verify_files.go
- Flat forms (verify, verify-files, verify-installed, verify-all) retained for backward compat
docs: update roadmap to mark phase 3 tasks as completed
All checks were successful
Test and Release / test (pull_request) Successful in 1m35s
Test and Release / lint (pull_request) Successful in 1m42s
9dad32c9d3
# Previous message:
Phase 3: mark key and cache command groups complete

Closes #0565, #0569, #0562, #0563, #0564, #0566, #0567, #0568

- key and cache already had nested subcommand structure
- mark completion of command alias implementation (ls→list, rm→remove, up→update, in→install)
- update roadmap to reflect completed tasks
- add symmetry support for hold/unhold and pin/unpin command pairs

# Previous message:
Phase 4: mark command aliases as complete

Closes #0574, #0570, #0571, #0572, #0573

- Aliases ls->list, rm->remove, up->update, in->install already implemented
# Previous message:
Phase 4: add unpin command for pin/unpin symmetry

Closes #0582, #0580, #0581

- Add tpkg unpin <pkgname> as symmetric counterpart to tpkg pin
- Removes package pin from repo config
- Follows the same pattern as hold/unhold
docs: update roadmap with completed command symmetry tasks and phase rename
All checks were successful
Test and Release / test (pull_request) Successful in 1m40s
Test and Release / lint (pull_request) Successful in 1m45s
5009ca927b
# Previous message:
Phase 4: ensure symmetry in command pairs, mark phase complete

Closes #0579, #0575, #0576, #0577, #0578

- hold/unhold, pin/unpin (via new unpin command), repo add/remove,
  key add/remove are all symmetric
# Previous message:
Phase 5: implement deprecation warning infrastructure

Closes #0589, #0583, #0584, #0585, #0586, #0587, #0588
Closes #0594, #0593

- Add deprecated() wrapper function for handler-level warnings
- Add --no-deprecation-warnings global flag to suppress warnings
- Add warnings to repo-index, repo-mirror, repo-verify, verify-files,
  verify-installed, verify-all pointing to new nested equivalents
- Old tpkg verify <file> falls back to verify package with warning
docs: update roadmap with completed deprecation timeline tasks
All checks were successful
Test and Release / test (pull_request) Successful in 1m37s
Test and Release / lint (pull_request) Successful in 1m44s
b31421bfd4
# Previous message:
Phase 5: define deprecation timeline

Closes #0592, #0590, #0591

- Document deprecation timeline: warn in v0.4.x, remove in v0.5.0
- Mark Phase 5 as complete
- Update build.go to load merged config and pass BuildTemp and CacheDir to builder
- Update install.go to load merged config and use Root from config when not specified
- Modify builder.go to accept BuildTemp and CacheDir in Config struct
- Update build process to use custom temp directory from config
- Mark roadmap items as completed for config integration

# Previous message:
Phase 6: ensure commands respect config precedence

Closes #0598, #0595, #0596, #0597

- tpkg install uses root from tpkg.conf if --root not specified
- tpkg build uses build_temp and cache_dir from tpkg.conf
- tpkg repo update already uses repository config via repo.LoadConfig
- Add BuildTemp and CacheDir fields to builder.Config
feat: mark config subcommands and flag override as completed in roadmap
All checks were successful
Test and Release / test (pull_request) Successful in 1m41s
Test and Release / lint (pull_request) Successful in 1m47s
cd1e066cb2
# Previous message:
Phase 6: mark config subcommands and flag precedence complete

Closes #0602, #0599, #0600, #0601, #0603

- config init/show/validate already implemented
- flags already override config (checked before config fallback)
feat: implement structured error handling and JSON output support
All checks were successful
Test and Release / test (pull_request) Successful in 1m26s
Test and Release / lint (pull_request) Successful in 1m38s
97dce64de4
# Previous message:
Phase 7: standardize error messages and exit codes

Closes #0607, #0604, #0605, #0606
Closes #0617, #0608, #0609, #0610, #0611, #0612, #0613, #0614, #0615, #0616
Closes #0620, #0618, #0619

- Create internal/errors package with Fatalf, Errorf, FatalfCmd, FatalfSuggest
- Define exit codes 0-8 as constants
- Update registry.Dispatch to use errors.Fatalf with ExitUsage code
- Add --json global flag for structured JSON error output
- Add --json to root help and flag parsing in main()
feat: add shell completion support for bash and zsh
Some checks failed
Test and Release / lint (pull_request) Failing after 56s
Test and Release / test (pull_request) Successful in 1m38s
cb40f560d2
# Previous message:
Phase 8: implement tab completion

Closes #0625, #0621, #0622, #0623, #0624
Closes #0628, #0626, #0627
Closes #0632, #0629, #0630, #0631

- Create cmd/tpkg/completion.go with bash and zsh output
- Bash: completes top-level cmds, subcommands, package names, flags
- Zsh: same coverage with compdef/_arguments support
- Add SubNames() and Aliases() exported methods to registry
- Register completion command in main.go
fix: assign return values of fmt.Fprintf call in completion.go
All checks were successful
Test and Release / test (pull_request) Successful in 1m31s
Test and Release / lint (pull_request) Successful in 1m39s
4733ef5138
# Previous message:
Phase 9: update tpkg(1) man page

Closes #0636, #0633, #0634, #0635

- Document all top-level commands with descriptions
- Document subcommand groups (cache, config, key, repo, verify)
- Document deprecated flat commands table
- Document global flags (--config, --version, --json,
  --no-deprecation-warnings)
- Document exit codes 0-8
- Add examples and completion usage
# Previous message:
Phase 9: update tpkg.conf and repo.conf man pages

Closes #0639, #0637, #0638
Closes #0642, #0640, #0641

- Add precedence level table to tpkg-conf.5
- Document full precedence chain: defaults < config < env < flags
- repo.conf.5 already had comprehensive format, merging, and field docs
feat: add tpkg-command(7) man page and update roadmap
All checks were successful
Test and Release / test (pull_request) Successful in 1m32s
Test and Release / lint (pull_request) Successful in 1m39s
2de7afd133
This commit adds the missing tpkg-command(7) overview man page and updates the ROADMAP.md to reflect that the documentation tasks have been completed. The changes include:
- Adding tpkg-command.7 to the Makefile build system
- Creating the tpkg-command.7.md source file with command hierarchy and usage patterns
- Updating the roadmap to mark the documentation tasks as completed
- Adding the man7 directory to the install target in Makefile
- Updating the phase title from "TODO Phase 10" to "DONE Phase 9

# Previous message:
Phase 9: create tpkg-command(7) overview man page

Closes #0645, #0643, #0644

- Create man/tpkg-command.7.md with full command hierarchy tree diagram
- Document common usage patterns for build, install, verify, repo mgmt
- Document configuration precedence, exit codes, and JSON scripting
- Update Makefile to build and install tpkg-command.7
fuzzy changed title from WIP: stone/v0.3.3 to stone/v0.3.3 2026-06-19 21:45:32 +00:00
# Previous message:
Phase 10: interactive shell enhancement

Closes #0648, #0646, #0647
Closes #0651, #0649, #0650
Closes #0654, #0652, #0653

- Build shell commands dynamically from registry (auto-syncs)
- Add tpkg shell --help showing all commands and multi-line docs
- Add lazy initialization of commands via sync.Once
- Add multi-line continuation on backslash, unmatched braces/quotes
Removed deprecated commands:
- repo-index, repo-mirror, repo-verify
- verify-all, verify-files, verify-installed
Removed --no-deprecation-warnings flag and associated logic.
Updated help text and man page to reflect removal of deprecated functionality.
Cleaned up unused code and imports related to deprecated features.

# Previous message:
remove all deprecated subcommands

repo-index, repo-mirror, repo-verify, verify-all, verify-files,
verify-installed flat forms removed. Use nested forms instead:
repo index, repo mirror, repo verify, verify all, verify files,
verify installed. Also remove deprecated() helper, the
--no-deprecation-warnings flag, and update man pages.
feat: add comprehensive command-line tests and improve help output
All checks were successful
Test and Release / test (pull_request) Successful in 1m28s
Test and Release / lint (pull_request) Successful in 1m40s
637c00ef6d
fix: standardize exit codes for command-line errors
refactor: enhance help messaging for all subcommands
test: introduce integration tests for command-line interface
chore: update test infrastructure and documentation

# Previous message:
Phase 11: add integration tests for commands, exit codes, and help

Closes #0659, #0655, #0656, #0657, #0658
Closes #0662, #0660, #0661
Closes #0666, #0663, #0664, #0665
Closes #0669, #0667, #0668

- Add test_commands.sh: verifies all top-level commands and subcommands
- Add test_exit_codes.sh: verifies exit codes 0, 1, 2
- Add test_help.sh: verifies help format and stderr output
- Update run_tests.sh to export TPKG and PATH
- Fix group command exit codes: --help exits 0, no-args exits 2
- Deprecation tests: N/A since deprecated commands were removed
fuzzy scheduled this pull request to auto merge when all checks succeed 2026-06-19 21:45:49 +00:00
fuzzy merged commit 637c00ef6d into main 2026-06-19 21:47:24 +00:00
fuzzy deleted branch stone/v0.3.3 2026-06-19 21:47:24 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
thwap/tpkg!670
No description provided.