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:
.SUFFIXES: .1.scd .1 .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 PREFIX?=/usr/local
BINDIR?=$(PREFIX)/bin BINDIR?=$(PREFIX)/bin
MANDIR?=$(PREFIX)/share/man MANDIR?=$(PREFIX)/share/man
@ -23,9 +16,7 @@ docs: docs/kiln.1
scdoc < $< > $@ scdoc < $< > $@
kiln: *.go go.mod go.sum config.toml templates/_default/* kiln: *.go go.mod go.sum config.toml templates/_default/*
$(GO) build $(GOFLAGS) \ $(GO) build $(GOFLAGS) -o $@
-ldflags "-X main.Version=$(VERSION)" \
-o $@
clean: clean:
$(RM) kiln $(RM) kiln

View file

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

View file

@ -12,10 +12,6 @@ import (
"strings" "strings"
) )
var (
Version string
)
func main() { func main() {
if len(os.Args) >= 2 { if len(os.Args) >= 2 {
switch os.Args[1] { switch os.Args[1] {
@ -29,13 +25,10 @@ func main() {
} }
newSite(os.Args[2]) newSite(os.Args[2])
return 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) os.Exit(1)
} }