Adding the version in the generated binary

This commit is contained in:
claudemiro
2016-03-05 09:30:36 -03:00
parent cbdd4e428a
commit 679ff1e589
3 changed files with 16 additions and 0 deletions
+1
View File
@@ -156,4 +156,5 @@ flymake*
ignore_http/* ignore_http/*
config.json config.json
*.pem *.pem
build
+6
View File
@@ -25,6 +25,12 @@ This software is written in Go - the WYSIWYG lang
* Multiple apps in the same instance; * Multiple apps in the same instance;
* Drop in replacement for pusher server; * Drop in replacement for pusher server;
# Download pre built binaries
You can download pre built binaries from the [releases tab](https://github.com/dimiro1/ipe/releases).
I do not have a Windows machine, so I can only distribute binaries for amd64 linux and amd64 darwin.
# Building # Building
```console ```console
+9
View File
@@ -11,6 +11,14 @@ import (
"github.com/dimiro1/ipe/ipe" "github.com/dimiro1/ipe/ipe"
) )
// These variables are generated by the linker
// please see the makefile for mor information.
var (
version string = "version"
buildstamp string = "buildstamp"
githash string = "githash"
)
// Main function, initialize the system // Main function, initialize the system
func main() { func main() {
var filename = flag.String("config", "config.json", "Config file location") var filename = flag.String("config", "config.json", "Config file location")
@@ -39,5 +47,6 @@ Y8P
`) `)
fmt.Println("\033[0m") fmt.Println("\033[0m")
fmt.Println("\033[32mWelcome to Ipê - Yet another Pusher server clone (https://github.com/dimiro1/ipe)\033[0m") fmt.Println("\033[32mWelcome to Ipê - Yet another Pusher server clone (https://github.com/dimiro1/ipe)\033[0m")
fmt.Printf("\033[32mVersion %s+%s.git.%s\033[0m\n", version, buildstamp, githash)
fmt.Println("\033[33mBy: Claudemiro Alves Feitosa Neto <[email protected]>\033[0m") fmt.Println("\033[33mBy: Claudemiro Alves Feitosa Neto <[email protected]>\033[0m")
} }