Skip to content

Commit

Permalink
fix: restore version
Browse files Browse the repository at this point in the history
Signed-off-by: Alessio Greggi <ale_grey_91@hotmail.it>
  • Loading branch information
alegrey91 committed Apr 22, 2024
1 parent 9a118fa commit 9d3d0f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ endif
go build \
-tags core,ebpf \
-v \
-ldflags="-s -w -X 'main.version=${GITHUB_REF_NAME}'" \
-ldflags="-s -w -X 'github.com/alegrey91/harpoon/cmd.Version=${GITHUB_REF_NAME}'" \
-o ${BINARY_DIR}/${BINARY_NAME} \
.

Expand Down
4 changes: 2 additions & 2 deletions cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ import (
"github.com/spf13/cobra"
)

var version = "test"
var Version = "test"

// captureCmd represents the create args
var versionCmd = &cobra.Command{
Use: "version",
Short: "Version of the tool.",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println(version)
fmt.Println(Version)
},
}

Expand Down

0 comments on commit 9d3d0f2

Please sign in to comment.