Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
fetch-depth: 0

- name: 'Codeowners Plus'
uses: multimediallc/codeowners-plus@v1.3.1
uses: multimediallc/codeowners-plus@v1.3.2
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
pr: '${{ github.event.pull_request.number }}'
Expand Down
2 changes: 1 addition & 1 deletion tools/cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func main() {
app := &cli.App{
Name: "codeowners-cli",
Usage: "CLI tool for working with .codeowners files",
Version: "v1.3.2.dev",
Version: "v1.3.3.dev",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Hardcoding the version string directly in the code can make the release process manual and error-prone.

A common practice in Go projects is to inject the version at build time using ldflags. This automates the versioning and makes it more robust.

You could consider the following approach:

  1. Declare a package-level variable for the version:
    var version = "dev" // Default for local builds
  2. Use this variable in your cli.App struct:
    app := &cli.App{
        // ...
        Version: version,
        // ...
    }
  3. Set the version during your release build process:
    go build -ldflags="-X 'main.version=v1.3.3.dev'" ./...

This change would improve the maintainability and automation of your release workflow.

Description: "",
Commands: []*cli.Command{
{
Expand Down
Loading