Implement distribution-specific builds
Make more things configurable at compile time so building binaries for distributions is easier while complying with the license.pull/141/head
parent
a0620ae92c
commit
9b651eb701
@ -1,3 +1,2 @@
|
|||||||
bin/
|
bin/
|
||||||
version.go
|
|
||||||
licenses.go
|
licenses.go
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"os"
|
|
||||||
"os/exec"
|
|
||||||
"strings"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cmd := exec.Command("git", "describe", "--tags")
|
|
||||||
ret, err := cmd.Output()
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
panic("Couldn't read git tags to embed version number")
|
|
||||||
}
|
|
||||||
version := strings.TrimSpace(string(ret))
|
|
||||||
|
|
||||||
out, _ := os.Create("version.go")
|
|
||||||
defer out.Close()
|
|
||||||
|
|
||||||
out.Write([]byte("package main\n\n//THIS FILE IS AUTOMATICALLY GENERATED BY `go generate` DO NOT EDIT!\n\nvar version=\""))
|
|
||||||
out.Write([]byte(version))
|
|
||||||
out.Write([]byte("\"\n"))
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
// +build !release
|
|
||||||
|
|
||||||
package main
|
|
||||||
|
|
||||||
type updateui struct {
|
|
||||||
serverVersion string
|
|
||||||
available bool
|
|
||||||
triggered bool
|
|
||||||
updatingText string
|
|
||||||
}
|
|
||||||
|
|
||||||
func updateCheck(ctx *ntcontext) {
|
|
||||||
// noop for non-release versions
|
|
||||||
}
|
|
||||||
|
|
||||||
func update(ctx *ntcontext) {
|
|
||||||
// noop for non-release versions
|
|
||||||
}
|
|
Loading…
Reference in New Issue