Conversation
willianpaixao
commented
Sep 2, 2025
- Add GitHub workflow to build and push the binaries to GitHub Packages
- Remove VERSION file, now it fetches from Git tags
- Dependencies updated
There was a problem hiding this comment.
Pull Request Overview
Refactors the CLI from flag-based command line parsing to use the urfave/cli/v3 framework, removes the VERSION file in favor of Git tag-based versioning, and updates dependencies.
- Migrates from Go's standard flag package to urfave/cli/v3 for better command structure and help generation
- Implements Git tag-based versioning with GitHub Actions workflow for automated binary builds
- Updates Go version and dependencies to latest versions
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| main.go | Complete refactor from flag-based to CLI framework with improved command structure and error handling |
| go.mod | Updates Go version to 1.25 and dependencies to latest versions |
| VERSION | Removes static version file |
| Makefile | Changes version detection to use Git tags instead of VERSION file |
| LICENSE.md | Removes trailing whitespace |
| .github/workflows/release.yml | Adds GitHub Actions workflow for building and releasing binaries |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Makefile
Outdated
|
|
||
| VERSION = $(shell cat VERSION) | ||
| # Get version from git tags, fallback to git describe if no tags | ||
| VERSION = $(git describe --tags --exact-match 2>/dev/null || git describe --tags --always --dirty) |
There was a problem hiding this comment.
The git command should be wrapped in shell function syntax. Use VERSION = $(shell git describe --tags --exact-match 2>/dev/null || git describe --tags --always --dirty) to properly execute the command.
| VERSION = $(git describe --tags --exact-match 2>/dev/null || git describe --tags --always --dirty) | |
| VERSION = $(shell git describe --tags --exact-match 2>/dev/null || git describe --tags --always --dirty) |
| if capFile == "" { | ||
| return errors.New("you must specify a cap file path with the -a flag") | ||
| } |
There was a problem hiding this comment.
This validation is unnecessary since the flag is marked as Required: true on line 74. The CLI framework will handle this validation automatically.
| if capFile == "" { | |
| return errors.New("you must specify a cap file path with the -a flag") | |
| } |
3e661a5 to
a3b17af
Compare