Skip to content

Commit

Permalink
Dynamically set version by goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
duncandu committed Jul 28, 2022
1 parent 343b751 commit 68cf880
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ var (
url = kingpin.Arg("url", "request url").Required().String()
)

// dynamically set by GoReleaser
var version = "dev"

func errAndExit(msg string) {
fmt.Fprintln(os.Stderr, "plow: "+msg)
os.Exit(1)
Expand Down Expand Up @@ -172,7 +175,7 @@ func rateFlag(c *kingpin.Clause) (target *rateFlagValue) {

func main() {
kingpin.UsageTemplate(CompactUsageTemplate).
Version("1.3.1").
Version(version).
Author("six-ddc@github").
Resolver(kingpin.PrefixedEnvarResolver("PLOW_", ";")).
Help = `A high-performance HTTP benchmarking tool with real-time web UI and terminal displaying`
Expand Down

0 comments on commit 68cf880

Please sign in to comment.