Now version is being set from a Makefile.
This commit is contained in:
parent
f15cf88ad9
commit
3aa9186f9e
3
Makefile
3
Makefile
@ -1,11 +1,10 @@
|
||||
TARGET=dwelling-files
|
||||
|
||||
SYSCTL=${shell which systemctl}
|
||||
SYSDDIR_=${shell pkg-config systemd --variable=systemdsystemunitdir}
|
||||
SYSDDIR=${SYSDDIR_:/%=%}
|
||||
DESTDIR=/
|
||||
|
||||
LDFLAGS=-ldflags "-s -w" -tags osusergo,netgo
|
||||
LDFLAGS=-ldflags "-s -w -X main.version=22.31.0" -tags osusergo,netgo
|
||||
|
||||
all: ${TARGET}
|
||||
|
||||
|
@ -14,6 +14,8 @@ import (
|
||||
"syscall"
|
||||
)
|
||||
|
||||
var version string
|
||||
|
||||
var listenAddress *string = flag.String("listen", "/var/run/dwelling-files/f.sock", "listen address (ip:port|unix_path)")
|
||||
var directoryPath *string = flag.String("path", "/srv/ftp", "path to file share")
|
||||
var disableFileHandler *bool = flag.Bool("no-file-handling", false, "disable file handling if it is handled by something else (e.g. NGiNX)")
|
||||
@ -24,7 +26,7 @@ func main() {
|
||||
log.SetFlags(0)
|
||||
|
||||
if *showVersion {
|
||||
fmt.Println("dwelling-files ver. 22.27.0\nCopyright (c) 2022 Alexander \"Arav\" Andreev <me@arav.top>")
|
||||
fmt.Println("dwelling-files ver.", version, "\nCopyright (c) 2022 Alexander \"Arav\" Andreev <me@arav.top>")
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user