fix(mk): Add version number in -V
awk(1) magic saves the day
This commit is contained in:
parent
43e53a4055
commit
824a60aef1
1 changed files with 4 additions and 2 deletions
6
mkfile
6
mkfile
|
@ -1,10 +1,12 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# Plan 9 mkfile
|
||||
|
||||
</$objtype/mkfile
|
||||
|
||||
GO = go
|
||||
PROG = awl
|
||||
|
||||
GOFLAGS = -ldflags=-s -ldflags=-w -ldflags=-X=main.version=PLAN9 -trimpath
|
||||
VERSION = `{awk '{print substr($0,0,8)}' .git/refs/heads/master}
|
||||
GOFLAGS = -ldflags=-s -ldflags=-w -ldflags=-X=main.version=$VERSION -trimpath
|
||||
|
||||
CGO_ENABLED = 0
|
||||
|
||||
|
|
Loading…
Reference in a new issue