Skip to content

Commit e3dab81

Browse files
committed
Updated version conflicts
1 parent 43d4e0c commit e3dab81

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ NPM_DIR := $(wildcard npm/*)
1010
CMD_DIR := $(filter-out cmd/README.md, $(wildcard cmd/*))
1111

1212
# Build flags
13-
BUILD_MODULE = "github.com/mutablelogic/go-server"
13+
BUILD_MODULE = "github.com/mutablelogic/go-sqlite"
1414
BUILD_LD_FLAGS += -X $(BUILD_MODULE)/pkg/config.GitSource=${BUILD_MODULE}
1515
BUILD_LD_FLAGS += -X $(BUILD_MODULE)/pkg/config.GitTag=$(shell git describe --tags)
1616
BUILD_LD_FLAGS += -X $(BUILD_MODULE)/pkg/config.GitBranch=$(shell git name-rev HEAD --name-only --always)

pkg/config/version.go

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package config
2+
3+
import (
4+
"fmt"
5+
"io"
6+
"runtime"
7+
)
8+
9+
///////////////////////////////////////////////////////////////////////////////
10+
// GLOBALS
11+
12+
var (
13+
GitSource string
14+
GitTag string
15+
GitBranch string
16+
GitHash string
17+
GoBuildTime string
18+
)
19+
20+
func PrintVersion(w io.Writer) {
21+
if GitSource != "" {
22+
fmt.Fprintf(w, " URL: https://%v\n", GitSource)
23+
}
24+
if GitTag != "" || GitBranch != "" {
25+
fmt.Fprintf(w, " Version: %v (branch: %q hash:%q)\n", GitTag, GitBranch, GitHash)
26+
}
27+
if GoBuildTime != "" {
28+
fmt.Fprintf(w, " Build Time: %v\n", GoBuildTime)
29+
}
30+
fmt.Fprintf(w, " Go: %v (%v/%v)\n", runtime.Version(), runtime.GOOS, runtime.GOARCH)
31+
}

0 commit comments

Comments
 (0)