Compare commits

...

3 Commits

Author SHA1 Message Date
sammy da6a4aa70f
chore: add build-dev to Makefile
this builds hilbish with a version including the latest git commit.
2021-05-14 06:22:20 -04:00
sammy 69c0ccc807
fix: make `version` a var
so now, it can be changed in compile time
2021-05-13 21:02:56 -04:00
sammy bb7f9e45f0
chore: bump version 2021-05-12 06:42:43 -04:00
2 changed files with 6 additions and 3 deletions

View File

@ -6,6 +6,9 @@ LIBDIR ?= $(PREFIX)/share/hilbish
build:
@go build
build-dev:
@go build -ldflags "-X main.version=$(git describe --tags)"
install:
@install -v -d "$(DESTDIR)$(BINDIR)/" && install -m 0755 -v hilbish "$(DESTDIR)$(BINDIR)/hilbish"
@mkdir -p "$(DESTDIR)$(LIBDIR)"
@ -25,4 +28,4 @@ clean:
all: build install
.PHONY: install uninstall build clean
.PHONY: install uninstall build build-dev clean

View File

@ -18,7 +18,7 @@ import (
"golang.org/x/term"
)
const version = "0.4.1-dev.8"
var version = "v0.4.1-dev.9"
var (
l *lua.LState
@ -76,7 +76,7 @@ func main() {
}
if *verflag {
fmt.Printf("Hilbish v%s\n", version)
fmt.Printf("Hilbish %s\n", version)
os.Exit(0)
}