ajustement version
This commit is contained in:
parent
e56b4a5b35
commit
9985fc2dff
@ -29,8 +29,11 @@ var ListCmd = &cobra.Command{
|
|||||||
|
|
||||||
// if -o flag is set, list projects for that org
|
// if -o flag is set, list projects for that org
|
||||||
if config.GetListOrganisationFlag() {
|
if config.GetListOrganisationFlag() {
|
||||||
|
if !config.GetJsonFlag() {
|
||||||
|
utils.PrintHeader()
|
||||||
fmt.Println("\nList projects for org: " + config.GetListOrganisation() + "\n")
|
fmt.Println("\nList projects for org: " + config.GetListOrganisation() + "\n")
|
||||||
fmt.Println(utils.CreateLine(6))
|
fmt.Println(utils.CreateLine(6))
|
||||||
|
}
|
||||||
projects, err := ListProjects(config.GetListOrganisation())
|
projects, err := ListProjects(config.GetListOrganisation())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Error:", err)
|
fmt.Println("Error:", err)
|
||||||
@ -45,8 +48,10 @@ var ListCmd = &cobra.Command{
|
|||||||
fmt.Println("Error:", err)
|
fmt.Println("Error:", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if !config.GetJsonFlag() {
|
||||||
fmt.Println("\nList of Organizations :")
|
fmt.Println("\nList of Organizations :")
|
||||||
fmt.Println(utils.CreateLine(4))
|
fmt.Println(utils.CreateLine(4))
|
||||||
|
}
|
||||||
for _, org := range orgs {
|
for _, org := range orgs {
|
||||||
fmt.Print(org)
|
fmt.Print(org)
|
||||||
}
|
}
|
||||||
|
27
makefile
27
makefile
@ -6,21 +6,38 @@ GOTEST=$(GOCMD) test
|
|||||||
GOGET=$(GOCMD) get
|
GOGET=$(GOCMD) get
|
||||||
|
|
||||||
# Binary name
|
# Binary name
|
||||||
BINARY_NAME=kode-starter
|
WINDOWS_BINARY_NAME=./release/windows/kode-starter.exe
|
||||||
|
LINUX_BINARY_NAME=./release/linux/kode-starter
|
||||||
|
|
||||||
|
# test, build, clean, release
|
||||||
all: test build
|
all: test build
|
||||||
|
|
||||||
build:
|
# build
|
||||||
$(GOBUILD) -o $(BINARY_NAME) -v
|
build-windows:
|
||||||
|
cd ./version/ && versionManager.exe go build
|
||||||
|
cd ..
|
||||||
|
set GOOS=windows
|
||||||
|
set GOARCH=amd64
|
||||||
|
$(GOBUILD) -o $(WINDOWS_BINARY_NAME) -v
|
||||||
|
|
||||||
|
build-linux:
|
||||||
|
cd ./version/ && versionManager.exe go build
|
||||||
|
cd ..
|
||||||
|
set GOOS=linux
|
||||||
|
set GOARCH=amd64
|
||||||
|
$(GOBUILD) -o $(LINUX_BINARY_NAME) -v
|
||||||
|
|
||||||
|
build-all: build-windows build-linux
|
||||||
|
|
||||||
test:
|
test:
|
||||||
$(GOTEST) -v ./...
|
$(GOTEST) -v ./...
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(GOCLEAN)
|
$(GOCLEAN)
|
||||||
rm -f $(BINARY_NAME)
|
powershell.exe -c "rm .\release\ -Recurse -Force"
|
||||||
|
|
||||||
release: clean
|
release: clean
|
||||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GOBUILD) -o $(BINARY_NAME) -v
|
cd ./version/ && versionManager.exe go release
|
||||||
|
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 $(GOBUILD) -o $(WINDOWS_BINARY_NAME) -v
|
||||||
|
|
||||||
.PHONY: all build test clean release
|
.PHONY: all build test clean release
|
BIN
release/linux/kode-starter
Normal file
BIN
release/linux/kode-starter
Normal file
Binary file not shown.
BIN
release/windows/kode-starter.exe
Normal file
BIN
release/windows/kode-starter.exe
Normal file
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
0.1.0.0
|
|
@ -1,7 +1,11 @@
|
|||||||
package version
|
package version
|
||||||
|
// This file is generated automatically by versionManager.exe.
|
||||||
|
// DO NOT EDIT THIS FILE.
|
||||||
|
// Any changes made to this file will be overwritten the next time versionManager.exe is run.
|
||||||
|
|
||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
||||||
|
// Version is a struct that contains the version number
|
||||||
type Version struct {
|
type Version struct {
|
||||||
Major int
|
Major int
|
||||||
Minor int
|
Minor int
|
||||||
@ -9,24 +13,31 @@ type Version struct {
|
|||||||
Build int
|
Build int
|
||||||
}
|
}
|
||||||
|
|
||||||
var versionNumber Version = Version{0, 1, 0, 0}
|
// version variable that will be set at build time by versionManager.exe
|
||||||
|
// *** DO NOT EDIT ***
|
||||||
|
var versionNumber Version = Version{0, 0, 0, 7}
|
||||||
|
|
||||||
|
// GetFullVersion returns the full version number as a string
|
||||||
func GetFullVersion() string {
|
func GetFullVersion() string {
|
||||||
return fmt.Sprintf("%d.%d.%d.%d", versionNumber.Major, versionNumber.Minor, versionNumber.Patch, versionNumber.Build)
|
return fmt.Sprintf("%d.%d.%d.%d", versionNumber.Major, versionNumber.Minor, versionNumber.Patch, versionNumber.Build)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetMajorVersion returns the major version number as a string
|
||||||
func GetMajorVersion() string {
|
func GetMajorVersion() string {
|
||||||
return fmt.Sprintf("%d", versionNumber.Major)
|
return fmt.Sprintf("%d", versionNumber.Major)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetMinorVersion returns the minor version number as a string
|
||||||
func GetMinorVersion() string {
|
func GetMinorVersion() string {
|
||||||
return fmt.Sprintf("%d", versionNumber.Minor)
|
return fmt.Sprintf("%d", versionNumber.Minor)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetPatchVersion returns the patch version number as a string
|
||||||
func GetPatchVersion() string {
|
func GetPatchVersion() string {
|
||||||
return fmt.Sprintf("%d", versionNumber.Patch)
|
return fmt.Sprintf("%d", versionNumber.Patch)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetBuildVersion returns the build version number as a string
|
||||||
func GetBuildVersion() string {
|
func GetBuildVersion() string {
|
||||||
return fmt.Sprintf("%d", versionNumber.Build)
|
return fmt.Sprintf("%d", versionNumber.Build)
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user