GOMOD: learning go.mod finally
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
e7042580fc
commit
9af10d9d94
13
Makefile
13
Makefile
|
@ -5,9 +5,20 @@ VERSION = $(shell cat resources/VERSION)
|
|||
|
||||
# PATH=/usr/bin:$PATH go version
|
||||
|
||||
run: build
|
||||
run: new-build
|
||||
~/go/bin/wit-debian-gui
|
||||
|
||||
new-build:
|
||||
go mod edit -replace git.wit.org/wit/gui=/home/jcarr/go/src/git.wit.org/wit/gui
|
||||
# to update go.mod to master:
|
||||
# go get git.wit.org/wit/gui@master
|
||||
go install -ldflags " \
|
||||
-X main.GITCOMMIT=${GITCOMMIT} \
|
||||
-X main.GOVERSION='${GOVERSION}' \
|
||||
-X main.BUILDTIME='${BUILDTIME}' \
|
||||
-X main.VERSION=${VERSION}"
|
||||
|
||||
# to build the old way
|
||||
build:
|
||||
GO111MODULE="off" go install -ldflags " \
|
||||
-X main.GITCOMMIT=${GITCOMMIT} \
|
||||
|
|
Loading…
Reference in New Issue