Compare commits

..

No commits in common. "f90e93842118f4c5c8734dda31c366add6b7066d" and "0fac4a3c1447baccfcf837f134b886cdc0ab5149" have entirely different histories.

4 changed files with 4 additions and 32 deletions

3
.gitignore vendored
View File

@ -16,6 +16,3 @@
# vendor/ # vendor/
.lumerc .lumerc
.vscode/configurationCache.log
.vscode/dryrun.log
.vscode/targets.log

View File

@ -1,25 +1,7 @@
V ?= 0
Q = $(if $(filter 1, $V),, @)
ifeq ($(OS), Windows_NT)
EXE=lume.exe
RM=del /f /q
BUILD_DATE=$(shell powershell Get-Date -Format "yyyy-MM-ddThh:mm:sszzz")
else
EXE=lume
EXE=rm -f
BUILD_DATE=$(shell date --iso-8601=seconds)
endif
LUME_VERSION ?= $(shell git describe --tags --always)
LDFLAGS := ${LDFLAGS} \
-X git.kill0.net/chill9/lume/cmd.Version=${LUME_VERSION} \
-X git.kill0.net/chill9/lume/cmd.BuildDate=${BUILD_DATE}
.PHONY: build .PHONY: build
build: build:
$(Q) go build -o ${EXE} -ldflags="${LDFLAGS}" ./cmd/lume go build -o lume ./cmd/lume
.PHONY: clean .PHONY: clean
clean: clean:
${RM} ${EXE} rm -f ./lifx

View File

@ -29,8 +29,7 @@ func init() {
RegisterCommand(NewCmdVersion()) RegisterCommand(NewCmdVersion())
} }
var Version string = "0.1.0-pre" const Version = "0.1.0-pre"
var BuildDate string
const lumercFile string = ".lumerc" const lumercFile string = ".lumerc"

View File

@ -2,7 +2,6 @@ package lumecmd
import ( import (
"fmt" "fmt"
"runtime"
) )
func NewCmdVersion() Command { func NewCmdVersion() Command {
@ -16,11 +15,6 @@ func NewCmdVersion() Command {
} }
func VersionCmd(args CmdArgs) (int, error) { func VersionCmd(args CmdArgs) (int, error) {
fmt.Printf("lume %s\n", Version) fmt.Println(Version)
fmt.Printf(" os/arch: %s/%s\n", runtime.GOOS, runtime.GOARCH)
fmt.Printf(" go version: %s\n", runtime.Version())
if BuildDate != "" {
fmt.Printf(" build date: %s\n", BuildDate)
}
return ExitSuccess, nil return ExitSuccess, nil
} }