fix version
This commit is contained in:
parent
1aeefe0ad9
commit
0ada6d0972
16
Makefile
16
Makefile
|
@ -1,15 +1,23 @@
|
|||
VERSION ?= $(shell git describe --tags 2>/dev/null)
|
||||
ifeq "$(VERSION)" ""
|
||||
VERSION := UNKNOWN
|
||||
endif
|
||||
|
||||
.PHONY: \
|
||||
all
|
||||
all \
|
||||
test
|
||||
|
||||
all: bin/pomo
|
||||
|
||||
clean:
|
||||
rm -v bin/pomo bindata.go
|
||||
rm -v bin/* 2> /dev/null || true
|
||||
|
||||
bindata.go:
|
||||
go-bindata -pkg main -o $@ tomato-icon.png
|
||||
|
||||
test:
|
||||
go test ./...
|
||||
|
||||
bin/pomo: bindata.go
|
||||
mkdir bin 2>/dev/null
|
||||
go build -o bin/pomo
|
||||
@echo mkdir bin 2>/dev/null || true
|
||||
go build -ldflags "-X main.Version=$(VERSION)" -o bin/pomo
|
||||
|
|
2
main.go
2
main.go
|
@ -97,7 +97,7 @@ func main() {
|
|||
var (
|
||||
path = app.StringOpt("p path", defaultConfigPath(), "path to the pomo config directory")
|
||||
)
|
||||
app.Version("v version", version)
|
||||
app.Version("v version", Version)
|
||||
app.Command("start s", "start a new task", start(path))
|
||||
app.Command("init", "initialize the sqlite database", initialize(path))
|
||||
app.Command("list l", "list historical tasks", list(path))
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
package main
|
||||
|
||||
var version = "undefined"
|
||||
var Version = "undefined"
|
||||
|
|
Loading…
Reference in New Issue