added git revision to the binary for debugging purposes

This commit is contained in:
Brad Rydzewski
2014-03-01 20:46:10 -07:00
parent c69e9d3ab7
commit 092b7c919b
2 changed files with 9 additions and 1 deletions

View File

@@ -46,6 +46,9 @@ var (
// build will timeout after N milliseconds.
// this will default to 500 minutes (6 hours)
timeout time.Duration
// commit sha for the current build.
version string
)
func main() {
@@ -67,6 +70,9 @@ func main() {
setupStatic()
setupHandlers()
// debug
log.Printf("starting drone version %s on port %s\n", version, port)
// start webserver using HTTPS or HTTP
if sslcert != "" && sslkey != "" {
panic(http.ListenAndServeTLS(port, sslcert, sslkey, nil))