Skip to content

Commit

Permalink
update version
Browse files Browse the repository at this point in the history
  • Loading branch information
yedf2 committed Dec 30, 2021
1 parent a441b6e commit 6f8af2b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ coverage.*
profile.*
test.sh
dtm
dtm.*
dtm-*
dtm.*
2 changes: 1 addition & 1 deletion helper/.goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ builds:
dir: .
main: main.go
ldflags:
- -s -w -X main.Version={{.Version}} -X main.Commit={{.Commit}} -X main.Date={{.Date}}
- -s -w -X main.Version={{.Version}}
9 changes: 2 additions & 7 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,13 @@ import (
_ "github.com/dtm-labs/dtmdriver-protocol1"
)

var Version, Commit, Date string
var Version string

func version() {
if Version == "" {
Version = "0.0.0-dev"
Commit = "NA"
Date = "NA"
}
if len(Commit) > 8 {
Commit = Commit[:8]
}
fmt.Printf("version: %s commit: %s built at: %s\n", Version, Commit, Date)
fmt.Printf("dtm version: %s\n", Version)
}

func usage() {
Expand Down

0 comments on commit 6f8af2b

Please sign in to comment.