summaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-05-15 23:42:46 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-05-15 23:42:46 +0200
commit9f6d0e831bd8fae07118ba26a61f4fdf8e8bc655 (patch)
treef85e9021702d4beeeb0df0446bb5e073f9ad0eeb /main.go
parent659d261e05f1b623dcc18e494e4e73a019c75188 (diff)
Rework Version and Sub-version setup.
Diffstat (limited to 'main.go')
-rw-r--r--main.go16
1 files changed, 9 insertions, 7 deletions
diff --git a/main.go b/main.go
index 6561785..40617d1 100644
--- a/main.go
+++ b/main.go
@@ -15,7 +15,6 @@ import (
const (
appName = "xds-server"
appDescription = "X(cross) Development System Server is a web server that allows to remotely cross build applications."
- appVersion = "0.0.1"
appCopyright = "Apache-2.0"
appUsage = "X(cross) Development System Server"
)
@@ -24,9 +23,12 @@ var appAuthors = []cli.Author{
cli.Author{Name: "Sebastien Douheret", Email: "sebastien@iot.bzh"},
}
-// AppVersionGitTag is the git tag id added to version string
-// Should be set by compilation -ldflags "-X main.AppVersionGitTag=xxx"
-var AppVersionGitTag = "unknown-dev"
+// AppVersion is the version of this application
+var AppVersion = "?.?.?"
+
+// AppSubVersion is the git tag id added to version string
+// Should be set by compilation -ldflags "-X main.AppSubVersion=xxx"
+var AppSubVersion = "unknown-dev"
// Web server main routine
func webServer(ctx *cli.Context) error {
@@ -58,12 +60,12 @@ func main() {
app.Name = appName
app.Description = appDescription
app.Usage = appUsage
- app.Version = appVersion + " (" + AppVersionGitTag + ")"
+ app.Version = AppVersion + " (" + AppSubVersion + ")"
app.Authors = appAuthors
app.Copyright = appCopyright
app.Metadata = make(map[string]interface{})
- app.Metadata["version"] = appVersion
- app.Metadata["git-tag"] = AppVersionGitTag
+ app.Metadata["version"] = AppVersion
+ app.Metadata["git-tag"] = AppSubVersion
app.Metadata["logger"] = log
app.Flags = []cli.Flag{