diff --git a/api/server/version.go b/api/server/version.go index aaf4e97d4..31468e935 100644 --- a/api/server/version.go +++ b/api/server/version.go @@ -4,11 +4,9 @@ import ( "net/http" "github.com/gin-gonic/gin" + "github.com/iron-io/functions/api/version" ) -// Version of IronFunctions -var Version = "0.2.17" - func handleVersion(c *gin.Context) { - c.JSON(http.StatusOK, gin.H{"version": Version}) + c.JSON(http.StatusOK, gin.H{"version": version.Version}) } diff --git a/api/version/version.go b/api/version/version.go new file mode 100644 index 000000000..c20784add --- /dev/null +++ b/api/version/version.go @@ -0,0 +1,4 @@ +package version + +// Version of IronFunctions +var Version = "0.2.16" diff --git a/fn/main.go b/fn/main.go index 37bef32f5..7433d124a 100644 --- a/fn/main.go +++ b/fn/main.go @@ -5,12 +5,11 @@ import ( "net/url" "os" + vers "github.com/iron-io/functions/api/version" functions "github.com/iron-io/functions_go" "github.com/urfave/cli" ) -const fnversion = "0.1.40" - var aliases = map[string]cli.Command{ "build": build(), "bump": bump(), @@ -33,7 +32,7 @@ func aliasesFn() []cli.Command { func newFn() *cli.App { app := cli.NewApp() app.Name = "fn" - app.Version = fnversion + app.Version = vers.Version app.Authors = []cli.Author{{Name: "iron.io"}} app.Description = "IronFunctions command line tools" app.UsageText = `Check the manual at https://github.com/iron-io/functions/blob/master/fn/README.md` diff --git a/fn/version.go b/fn/version.go index f36e6bb44..571fc3dbd 100644 --- a/fn/version.go +++ b/fn/version.go @@ -5,6 +5,7 @@ import ( "net/url" "os" + vers "github.com/iron-io/functions/api/version" functions "github.com/iron-io/functions_go" "github.com/urfave/cli" ) @@ -34,7 +35,7 @@ func (r *versionCmd) version(c *cli.Context) error { } r.Configuration.BasePath = u.String() - fmt.Println("Client version:", fnversion) + fmt.Println("Client version:", vers.Version) v, _, err := r.VersionGet() if err != nil { return err