Skip to content

Commit

Permalink
Remove date from build and --version
Browse files Browse the repository at this point in the history
Makes builds more reproducable
  • Loading branch information
wjdp committed Mar 28, 2022
1 parent b8d61a2 commit 43e49ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

# Script for devs to build a copy of the app with build flags set

go build -ldflags "-X main.date=`date -u +%Y-%m-%dT%H:%M:%SZ` -X main.version=`git describe --tags`" -o bin/htmltest -x main.go
go build -ldflags "-X main.version=`git describe --tags`" -o bin/htmltest -x main.go
3 changes: 1 addition & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const cmdSeparator string = "===================================================

var (
version string
date string
fileMode bool
)

Expand All @@ -43,7 +42,7 @@ Options:
time considerably.
-v, --version Show version and build time.
`
versionText := "htmltest " + version + "\n" + date
versionText := "htmltest " + version
arguments, _ := docopt.Parse(usage, nil, true, versionText, false)

// fmt.Println(arguments)
Expand Down

0 comments on commit 43e49ac

Please sign in to comment.