Skip to content

Commit

Permalink
makefile: Drop semicolons in 'go build' output to not confuse vim
Browse files Browse the repository at this point in the history
When running "make" under vim, it treats numbers after semicolons as
line numbers and the existing invocation of "git lot" uses the date format
with semicolons.

This changes the git rev not to use semicolons so it changes from
"Wed, 13 May 2020 21:11:52 +0200" to "20200513-211152".

Signed-off-by: Alexey Kardashevskiy <aik@linux.ibm.com>
  • Loading branch information
Alexey Kardashevskiy committed Sep 10, 2020
1 parent 65697b2 commit a5306ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ ifeq ("$(shell git diff --shortstat)", "")
else
REV=$(GITREV)+
endif
GITREVDATE=$(shell git log -n 1 --format="%ad")
GITREVDATE=$(shell git log -n 1 --format="%ad" --date=format:%Y%m%d-%H%M%S)

# Don't generate symbol table and DWARF debug info.
# Reduces build time and binary sizes considerably.
Expand Down
2 changes: 1 addition & 1 deletion prog/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func init() {
GitRevisionBase = strings.Replace(GitRevision, "+", "", -1)
if gitRevisionDate != "" {
var err error
if GitRevisionDate, err = time.Parse("Mon Jan 2 15:04:05 2006 -0700", gitRevisionDate); err != nil {
if GitRevisionDate, err = time.Parse("20060102-150405", gitRevisionDate); err != nil {
panic(err)
}
}
Expand Down

0 comments on commit a5306ab

Please sign in to comment.