forked from sloum/bombadillo
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.
|
||||
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
|
||||
build:
|
||||
${GOCMD} build ${LDFLAGS} -o ${BINARY}
|
||||
${GOCMD} build -o ${BINARY}
|
||||
|
||||
.PHONY: install
|
||||
install: install-bin install-man install-desktop clean
|
||||
|
|
5
main.go
5
main.go
|
@ -35,8 +35,7 @@ import (
|
|||
"tildegit.org/sloum/bombadillo/gemini"
|
||||
)
|
||||
|
||||
var version string
|
||||
var build string
|
||||
var version string = "2.3.3"
|
||||
|
||||
var bombadillo *client
|
||||
var helplocation string = "gopher://bombadillo.colorfield.space:70/1/user-guide.map"
|
||||
|
@ -211,7 +210,7 @@ func main() {
|
|||
flag.Usage = printHelp
|
||||
flag.Parse()
|
||||
if *getVersion {
|
||||
fmt.Printf("Bombadillo %s - build %s\n", version, build)
|
||||
fmt.Printf("Bombadillo %s\n", version)
|
||||
os.Exit(0)
|
||||
}
|
||||
args := flag.Args()
|
||||
|
|
Loading…
Reference in New Issue