From 679ff1e58987323c416585322eff0fde1187f8a3 Mon Sep 17 00:00:00 2001 From: claudemiro Date: Sat, 5 Mar 2016 09:30:36 -0300 Subject: [PATCH] Adding the version in the generated binary --- .gitignore | 1 + README.md | 6 ++++++ main.go | 9 +++++++++ 3 files changed, 16 insertions(+) diff --git a/.gitignore b/.gitignore index fa1bd42..0546773 100644 --- a/.gitignore +++ b/.gitignore @@ -156,4 +156,5 @@ flymake* ignore_http/* config.json *.pem +build diff --git a/README.md b/README.md index 6fb0efd..42e88b2 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,12 @@ This software is written in Go - the WYSIWYG lang * Multiple apps in the same instance; * 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 ```console diff --git a/main.go b/main.go index 1f9b16b..ec709a8 100644 --- a/main.go +++ b/main.go @@ -11,6 +11,14 @@ import ( "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 func main() { var filename = flag.String("config", "config.json", "Config file location") @@ -39,5 +47,6 @@ Y8P `) fmt.Println("\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 \033[0m") }