Skip to content
This repository has been archived by the owner on Jun 18, 2022. It is now read-only.

Commit

Permalink
Merge pull request #53 from StrongMonkey/get-version
Browse files Browse the repository at this point in the history
add version ability
  • Loading branch information
ibuildthecloud authored Oct 12, 2016
2 parents 897dd6d + f7167cb commit 474d5ee
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
package main

import (
"os"

"flag"
"fmt"
"github.com/Sirupsen/logrus"
"github.com/rancher/agent/events"
"os"
)

var VERSION = "dev"

func main() {
version := flag.Bool("version", false, "go-agent version")
flag.Parse()
if *version {
fmt.Printf("go-agent version %s \n", VERSION)
os.Exit(0)
}

logrus.Info("Launching agent")

url := os.Getenv("CATTLE_URL")
Expand Down

0 comments on commit 474d5ee

Please sign in to comment.