Somewhat better version handling
This commit is contained in:
parent
e7596e41f7
commit
f5de8d1f37
5 changed files with 19 additions and 12 deletions
|
|
@ -1,7 +1,10 @@
|
|||
NAME = rexserver
|
||||
|
||||
VERSION_FILE := ../VERSION.txt
|
||||
REX_VERSION ?= $(shell cat $(VERSION_FILE))
|
||||
|
||||
build: commit.txt
|
||||
go build -o $(NAME)
|
||||
go build -ldflags="-X main.rex_version=$(REX_VERSION)" -o $(NAME)
|
||||
|
||||
run: commit.txt
|
||||
go run .
|
||||
|
|
|
|||
|
|
@ -7,11 +7,15 @@ import (
|
|||
"net/http"
|
||||
"rex_model"
|
||||
"time"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var rex_version = "UNDEFINED"
|
||||
|
||||
func main() {
|
||||
port := ":8080"
|
||||
addons := rex_model.AddonIndex
|
||||
log.Printf("Starting RexForge server version: %s", strings.ToUpper(rex_version))
|
||||
|
||||
mux := http.NewServeMux()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue