mirror of
https://git.sr.ht/~adnano/kiln
synced 2024-12-27 22:29:09 +00:00
Remove version command
This commit is contained in:
parent
748dfb0c3f
commit
0301276c75
11
Makefile
11
Makefile
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
9
main.go
9
main.go
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue