Skip to content

Commit

Permalink
change version from tag
Browse files Browse the repository at this point in the history
Signed-off-by: allan716 <[email protected]>
  • Loading branch information
allanpk716 committed Jul 28, 2022
1 parent 64790e3 commit a5dff0a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ builds:
- amd64
main: ./cmd/go-protocol-detector/main.go
ldflags:
- -s -w --extldflags "-static -fpic"
- -s -w --extldflags "-static -fpic" -X main.AppVersion=v{{ .Version }}

archives:
- id: archive
Expand Down
4 changes: 3 additions & 1 deletion cmd/go-protocol-detector/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ var (
priKeyFullPath string
)

var AppVersion = "unknow"

func main() {
app := &cli.App{
Name: "go-protocol-detector",
Usage: "use like: go-protocol-detector --protocol=rdp --host=172.20.65.89-101 --port=3389",
Description: "Multi-protocol scan tool",
Version: "v0.1.0",
Version: AppVersion,
Flags: []cli.Flag{
&cli.StringFlag{
Name: "protocol",
Expand Down

0 comments on commit a5dff0a

Please sign in to comment.