Skip to content

Commit

Permalink
Bug/version (#75)
Browse files Browse the repository at this point in the history
* #67 | modify | remove not needed requirements

Signed-off-by: Manuel Müller <mueller.m.h@gmail.com>

* #66 | fix | Getting started link

Signed-off-by: Manuel Müller <mueller.m.h@gmail.com>

* #66 | modify | change path relative

Signed-off-by: Manuel Müller <mueller.m.h@gmail.com>

* Update Documentation on master branch (#72)

* Modified docs

Signed-off-by: niki-1905 <nikkikokitkar@gmail.com>

* Remove jmeter submodule, literatebee key, and empty vendor folder.

Signed-off-by: Arush Salil <me@aru.sh>

* Update Dockerfile

Signed-off-by: Arush Salil <me@aru.sh>

* Update Readme

Signed-off-by: Arush Salil <me@aru.sh>

* Update AWS documentation

Signed-off-by: Arush Salil <me@aru.sh>

* Add lifecycle documentation.

Signed-off-by: Arush Salil <me@aru.sh>

* Fix typo

Signed-off-by: Arush Salil <me@aru.sh>
Signed-off-by: Manuel Müller <mueller.m.h@gmail.com>

* Release/0 5 1 (#73)

* Modified docs

Signed-off-by: niki-1905 <nikkikokitkar@gmail.com>

* Remove jmeter submodule, literatebee key, and empty vendor folder.

Signed-off-by: Arush Salil <me@aru.sh>

* Update Dockerfile

Signed-off-by: Arush Salil <me@aru.sh>

* Update Readme

Signed-off-by: Arush Salil <me@aru.sh>

* Update AWS documentation

Signed-off-by: Arush Salil <me@aru.sh>

* Add lifecycle documentation.

Signed-off-by: Arush Salil <me@aru.sh>

* Fix typo

Signed-off-by: Arush Salil <me@aru.sh>

* Refactor and add tests

Signed-off-by: Manuel Müller <mueller.m.h@gmail.com>

* Update documentation

* Update .gitignore

* add pkg provisioner

* Update Makefile

* TK8-47  add infrastructure only flag

https://kubernauts.atlassian.net/browse/TK8-47
Signed-off-by: Manuel Müller <mueller.m.h@gmail.com>

* BUG | Fix Version display

The version is not display like accepted
This will fix it

Signed-off-by: Manuel Müller <mueller.m.h@gmail.com>
  • Loading branch information
MuellerMH authored Oct 23, 2018
1 parent 0a3ad25 commit 9809d0c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
PROJECT := github.com/kubernauts/tk8
VERSION := $(shell git tag 2>/dev/null|tail -n 1)
GITCOMMIT := $(shell git rev-parse --short HEAD 2>/dev/null)
BUILD_FLAGS := -ldflags="-w -X $(PROJECT)/cmd.GITCOMMIT=$(GITCOMMIT) -X $(PROJECT)/cmd.VERSION=$(VERSION)"
BUILD_FLAGS := -ldflags "-w -s -X $(PROJECT)/pkg/common.GITCOMMIT=$(GITCOMMIT) -X $(PROJECT)/pkg/common.VERSION=$(VERSION)"



default: bin

Expand Down
3 changes: 2 additions & 1 deletion cmd/cli/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package cmd
import (
"fmt"

"github.com/kubernauts/tk8/pkg/common"
"github.com/spf13/cobra"
)

Expand All @@ -33,7 +34,7 @@ var versionCmd = &cobra.Command{
Long: `All software has versions. This is TK8's`,
Run: func(cmd *cobra.Command, args []string) {

fmt.Println("Version:" + VERSION + " (Build: " + GITCOMMIT + ")")
fmt.Println("Version:" + common.VERSION + " (Build: " + common.GITCOMMIT + ")")
},
}

Expand Down
8 changes: 7 additions & 1 deletion pkg/common/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ import (
"path/filepath"
)

var Name string
var (
Name string
// GITCOMMIT will hold the commit SHA to be used in the version command.
GITCOMMIT = "0"
// VERSION will hold the version number to be used in the version command.
VERSION = "dev"
)

// ErrorCheck is responsbile to check if there is any error returned by a command.
func ErrorCheck(msg string, err error) {
Expand Down

0 comments on commit 9809d0c

Please sign in to comment.