1
0
Fork 0
mirror of https://git.sr.ht/~adnano/kiln synced 2024-05-20 22:36:04 +02:00

Remove version command

This commit is contained in:
Adnan Maolood 2022-07-06 08:59:03 -04:00
parent 4e6a81ebe7
commit 7ea73f0659
3 changed files with 2 additions and 22 deletions

View File

@ -2,13 +2,6 @@
.SUFFIXES:
.SUFFIXES: .1.scd .1
_git_version=$(shell git describe --tags --dirty 2>/dev/null)
ifeq ($(strip $(_git_version)),)
VERSION=0.3.1
else
VERSION=$(_git_version)
endif
PREFIX?=/usr/local
BINDIR?=$(PREFIX)/bin
MANDIR?=$(PREFIX)/share/man
@ -23,9 +16,7 @@ docs: docs/kiln.1
scdoc < $< > $@
kiln: *.go go.mod go.sum config.toml templates/_default/*
$(GO) build $(GOFLAGS) \
-ldflags "-X main.Version=$(VERSION)" \
-o $@
$(GO) build $(GOFLAGS) -o $@
clean:
$(RM) kiln

View File

@ -10,16 +10,12 @@ kiln - a simple static site generator
*kiln* new _path_
*kiln* version
# DESCRIPTION
*kiln build* builds a kiln site.
*kiln new* creates a new kiln site at the given path.
*kiln version* prints version information for the kiln program.
# OPTIONS
## kiln build

View File

@ -12,10 +12,6 @@ import (
"strings"
)
var (
Version string
)
func main() {
if len(os.Args) >= 2 {
switch os.Args[1] {
@ -29,13 +25,10 @@ func main() {
}
newSite(os.Args[2])
return
case "version":
fmt.Println("kiln", Version)
return
}
}
fmt.Println("usage: kiln <build | new | version> args...")
fmt.Println("usage: kiln <build | new> args...")
os.Exit(1)
}