Skip to content

Commit

Permalink
chore: update showVersion and goreleaser CI action
Browse files Browse the repository at this point in the history
  • Loading branch information
Xumeiquer committed Jul 19, 2023
1 parent 751b251 commit fd1e412
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ builds:
flags:
- -trimpath
ldflags:
- "-s -w -X main.version='{{.Version}}' -X main.commit='{{.Commit}}' -X main.date='{{.Date}}' -X main.builtBy='goreleaser'"
- "-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}"

changelog:
use: github
Expand Down
6 changes: 2 additions & 4 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ var (
version string = ""
commit string = ""
date string = ""
builtBy string = ""
)

func init() {
Expand Down Expand Up @@ -148,9 +147,8 @@ func generateTeplate(header string, line string, footer string, sep string) stri
}

func showVerion() {
fmt.Println("Norma43 parser.")
fmt.Println("n43 -- Norma43 parser")
fmt.Printf("Version: %s\n", version)
fmt.Printf("Build: %s.%s\n", version, commit)
fmt.Printf("Build: %s_%s\n", version, commit)
fmt.Printf("Build on: %s\n", date)
fmt.Printf("Build by: %s\n", builtBy)
}

0 comments on commit fd1e412

Please sign in to comment.