move Version and Commit to core
This commit is contained in:
@@ -24,7 +24,7 @@ GO ?= CGO_ENABLED=0 go
|
||||
GOFLAGS ?=
|
||||
#GOLDFLAGS ?= -X main.Version=$(VERSION) -X main.Commit=$(COMMIT)
|
||||
# also strips executable, significantly reduces size
|
||||
GOLDFLAGS ?= -s -w -X main.Version=$(VERSION) -X main.Commit=$(COMMIT)
|
||||
GOLDFLAGS ?= -s -w -X golang.nytpu.com/comitium/core.Version=$(VERSION) -X golang.nytpu.com/comitium/core.Commit=$(COMMIT)
|
||||
SCDOC ?= scdoc
|
||||
MKDIR ?= mkdir -p
|
||||
RM ?= rm -f
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ func main() {
|
||||
os.Exit(0)
|
||||
}
|
||||
if os.Args[1] == "version" {
|
||||
fmt.Printf("comitium v%v, commit %v\n", Version, Commit)
|
||||
fmt.Printf("comitium v%v, commit %v\n", core.Version, core.Commit)
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
|
||||
+4
-2
@@ -156,12 +156,14 @@ func (d *FullData) WriteFeed(dataPath string) error {
|
||||
}
|
||||
}
|
||||
|
||||
rawPage += `
|
||||
rawPage += fmt.Sprintf(`
|
||||
|
||||
---
|
||||
|
||||
=> https://git.nytpu.com/comitium/about/ aggregated using comitium
|
||||
`
|
||||
`,
|
||||
Version,
|
||||
)
|
||||
|
||||
err := ioutil.WriteFile(path, []byte(rawPage), 0666)
|
||||
if err != nil {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
// For more license details, see LICENSE or <https://www.gnu.org/licenses/agpl-3.0.html>.
|
||||
|
||||
package main
|
||||
package core
|
||||
|
||||
// These variables are set by the linker. They can be modified in the Makefile.
|
||||
var (
|
||||
Reference in New Issue
Block a user