Skip to content

Commit 9d3d0f2

Browse files
committed
fix: restore version
Signed-off-by: Alessio Greggi <[email protected]>
1 parent 9a118fa commit 9d3d0f2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ endif
5050
go build \
5151
-tags core,ebpf \
5252
-v \
53-
-ldflags="-s -w -X 'main.version=${GITHUB_REF_NAME}'" \
53+
-ldflags="-s -w -X 'github.com/alegrey91/harpoon/cmd.Version=${GITHUB_REF_NAME}'" \
5454
-o ${BINARY_DIR}/${BINARY_NAME} \
5555
.
5656

cmd/version.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ import (
2121
"github.com/spf13/cobra"
2222
)
2323

24-
var version = "test"
24+
var Version = "test"
2525

2626
// captureCmd represents the create args
2727
var versionCmd = &cobra.Command{
2828
Use: "version",
2929
Short: "Version of the tool.",
3030
Run: func(cmd *cobra.Command, args []string) {
31-
fmt.Println(version)
31+
fmt.Println(Version)
3232
},
3333
}
3434

0 commit comments

Comments
 (0)