Skip to content

Refactor#2

Merged
willianpaixao merged 1 commit intodevelopfrom
refactor
Sep 2, 2025
Merged

Refactor#2
willianpaixao merged 1 commit intodevelopfrom
refactor

Conversation

@willianpaixao
Copy link
Copy Markdown
Owner

  • Add GitHub workflow to build and push the binaries to GitHub Packages
  • Remove VERSION file, now it fetches from Git tags
  • Dependencies updated

Copilot AI review requested due to automatic review settings September 2, 2025 14:30
@willianpaixao willianpaixao self-assigned this Sep 2, 2025
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link

Copilot AI Sep 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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)

Copilot uses AI. Check for mistakes.
Comment on lines +235 to +237
if capFile == "" {
return errors.New("you must specify a cap file path with the -a flag")
}
Copy link

Copilot AI Sep 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This validation is unnecessary since the flag is marked as Required: true on line 74. The CLI framework will handle this validation automatically.

Suggested change
if capFile == "" {
return errors.New("you must specify a cap file path with the -a flag")
}

Copilot uses AI. Check for mistakes.
@willianpaixao willianpaixao merged commit 9a2ff55 into develop Sep 2, 2025
@willianpaixao willianpaixao deleted the refactor branch September 2, 2025 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants