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
|
# PATH=/usr/bin:$PATH go version
|
||||||
|
|
||||||
run: build
|
run: new-build
|
||||||
~/go/bin/wit-debian-gui
|
~/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:
|
build:
|
||||||
GO111MODULE="off" go install -ldflags " \
|
GO111MODULE="off" go install -ldflags " \
|
||||||
-X main.GITCOMMIT=${GITCOMMIT} \
|
-X main.GITCOMMIT=${GITCOMMIT} \
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -42,3 +42,5 @@ require (
|
||||||
golang.org/x/sys v0.0.0-20211031064116-611d5d643895 // indirect
|
golang.org/x/sys v0.0.0-20211031064116-611d5d643895 // indirect
|
||||||
golang.org/x/text v0.3.6 // indirect
|
golang.org/x/text v0.3.6 // indirect
|
||||||
)
|
)
|
||||||
|
|
||||||
|
replace git.wit.org/wit/gui => /home/jcarr/go/src/git.wit.org/wit/gui
|
||||||
|
|
Loading…
Reference in New Issue