Removes previous version build system in favor of simple variable
This commit is contained in:
parent
ee56961b20
commit
f18dc293fd
10
Makefile
10
Makefile
|
@ -13,17 +13,9 @@ test : GOCMD := go1.11.13
|
||||||
# %:z - so settle for %z.
|
# %:z - so settle for %z.
|
||||||
BUILD_TIME := ${shell date "+%Y-%m-%dT%H:%M%z"}
|
BUILD_TIME := ${shell date "+%Y-%m-%dT%H:%M%z"}
|
||||||
|
|
||||||
# If VERSION is empty or not defined use the contents of the VERSION file
|
|
||||||
VERSION := ${shell git describe --exact-match 2> /dev/null}
|
|
||||||
ifndef VERSION
|
|
||||||
VERSION := ${shell cat ./VERSION}
|
|
||||||
endif
|
|
||||||
|
|
||||||
LDFLAGS := -ldflags "-s -X main.version=${VERSION} -X main.build=${BUILD_TIME}"
|
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build:
|
build:
|
||||||
${GOCMD} build ${LDFLAGS} -o ${BINARY}
|
${GOCMD} build -o ${BINARY}
|
||||||
|
|
||||||
.PHONY: install
|
.PHONY: install
|
||||||
install: install-bin install-man install-desktop clean
|
install: install-bin install-man install-desktop clean
|
||||||
|
|
5
main.go
5
main.go
|
@ -35,8 +35,7 @@ import (
|
||||||
"tildegit.org/sloum/bombadillo/gemini"
|
"tildegit.org/sloum/bombadillo/gemini"
|
||||||
)
|
)
|
||||||
|
|
||||||
var version string
|
var version string = "2.3.3"
|
||||||
var build string
|
|
||||||
|
|
||||||
var bombadillo *client
|
var bombadillo *client
|
||||||
var helplocation string = "gopher://bombadillo.colorfield.space:70/1/user-guide.map"
|
var helplocation string = "gopher://bombadillo.colorfield.space:70/1/user-guide.map"
|
||||||
|
@ -211,7 +210,7 @@ func main() {
|
||||||
flag.Usage = printHelp
|
flag.Usage = printHelp
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
if *getVersion {
|
if *getVersion {
|
||||||
fmt.Printf("Bombadillo %s - build %s\n", version, build)
|
fmt.Printf("Bombadillo %s\n", version)
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
args := flag.Args()
|
args := flag.Args()
|
||||||
|
|
Loading…
Reference in New Issue