Skip to content

Commit

Permalink
do versioning slightly better
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkelam committed Jul 16, 2024
1 parent d3ea090 commit a77e8e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
GOCC := go

# binary metadata
VERSION := $(shell git describe --always --tags)
COMMIT := $(shell git rev-parse HEAD)
VERSION ?= $(shell git describe --always --tags)
COMMIT ?= $(shell git rev-parse HEAD)
DATE := $(shell date -u +%Y-%m-%dT%H:%M:%SZ)
GIT_COMMIT=$(shell git rev-parse HEAD)

Expand Down
7 changes: 1 addition & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var notHTTPS bool
var simpleProgress bool

func main() {
displayVersion = fmt.Sprintf("fast-cli %s-%s - built %s", version, commit, date)
displayVersion = fmt.Sprintf("%s-%s (built %s)", version, commit, date)
app := &cli.App{
Name: "fast-cli",
Usage: "Estimates your current internet download speed",
Expand Down Expand Up @@ -76,11 +76,6 @@ func initLog() {
func run(c *cli.Context) error {
initLog()

if c.Bool("version") {
fmt.Println(displayVersion)
return nil
}

count := uint64(3)
fast.UseHTTPS = !notHTTPS
urls := fast.GetDlUrls(count)
Expand Down

0 comments on commit a77e8e2

Please sign in to comment.