Starts regular version numbering and removes git call from makefile
This commit is contained in:
parent
2ccdefb756
commit
a9418956b5
6
Makefile
6
Makefile
@ -7,16 +7,14 @@ DATAROOTDIR := ${PREFIX}/share
|
||||
LIBDIR := ${PREFIX}/lib
|
||||
MANDIR := ${DATAROOTDIR}/man
|
||||
MAN1DIR := ${MANDIR}/man1
|
||||
VERSION := $(shell git rev-list HEAD --count)
|
||||
VERSION_HASH := $(shell git rev-list -1 HEAD)
|
||||
|
||||
.PHONY: build
|
||||
build:
|
||||
${GOCMD} build -ldflags "-w -s -X main.VersionHash=${VERSION_HASH}" -o ${BINARY}
|
||||
${GOCMD} build -ldflags "-w -s" -o ${BINARY}
|
||||
|
||||
.PHONY: gui
|
||||
gui:
|
||||
${GOCMD} build -tags gui -ldflags "-w -s -X main.VersionHash=${VERSION_HASH}" -o ${BINARY}
|
||||
${GOCMD} build -tags gui -ldflags "-w -s" -o ${BINARY}
|
||||
|
||||
.PHONY: install
|
||||
install: install-bin install-man install-module-dir clean
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package main
|
||||
|
||||
const guiIsOn = "(gui)"
|
||||
const guiIsOn = "(+gui)"
|
||||
|
||||
var guiUsageStrings = map[string]string{
|
||||
"dialog-error": "(dialog-error [gui-root] [window-name: string] [error: string]) => ()\n\nShows an error message. The dialog that is opened is not a system native dialog and will be constrained by the window size",
|
||||
|
9
main.go
9
main.go
@ -14,12 +14,13 @@ import (
|
||||
ln "github.com/peterh/liner"
|
||||
)
|
||||
|
||||
const version = "0.5.0"
|
||||
|
||||
const globalLibPath = "/usr/local/lib/slope/modules/"
|
||||
|
||||
var openFiles []*IOHandle
|
||||
var replCounter int = 0
|
||||
var line *ln.State
|
||||
var VersionHash string
|
||||
var initialTerm ln.ModeApplier = nil
|
||||
var linerTerm ln.ModeApplier = nil
|
||||
var panicOnException = true // default to `(exception-mode-panic)`
|
||||
@ -247,11 +248,7 @@ func prompt(l *ln.State, cont bool) string {
|
||||
|
||||
func PrintVersion() {
|
||||
logo := "\033[7m┌─┐┬ ┌─┐┌─┐┌─┐\033[0m\n\033[7m└─┐│ │ │├─┘├┤ \033[0m\n\033[7m└─┘┴─┘└─┘┴ └─┘\033[0m"
|
||||
if VersionHash != "" {
|
||||
fmt.Printf("\033[1m%s\033[0m\nBuild Version Hash/Commit: %s %s\n(c) 2021 sloum, see license with: (license)\n", logo, VersionHash, guiIsOn)
|
||||
} else {
|
||||
fmt.Printf("\033[1m%s\033[0m\nBuild Version Hash/Commit: Custom Build (not hash based)\n(c) 2021 sloum, see license with: \033[1m(license)\033[0m\n", logo)
|
||||
}
|
||||
fmt.Printf("\033[1m%s\033[0m\nVersion: %s %s\n(c) 2021 sloum, see license with: (license)\n", logo, version, guiIsOn)
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
@ -2,6 +2,6 @@
|
||||
|
||||
package main
|
||||
|
||||
const guiIsOn = "(no gui)"
|
||||
const guiIsOn = "()"
|
||||
|
||||
var guiUsageStrings = map[string]string{}
|
||||
|
Loading…
Reference in New Issue
Block a user