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 config.GetListOrganisationFlag() {
|
||||
fmt.Println("\nList projects for org: " + config.GetListOrganisation() + "\n")
|
||||
fmt.Println(utils.CreateLine(6))
|
||||
if !config.GetJsonFlag() {
|
||||
utils.PrintHeader()
|
||||
fmt.Println("\nList projects for org: " + config.GetListOrganisation() + "\n")
|
||||
fmt.Println(utils.CreateLine(6))
|
||||
}
|
||||
projects, err := ListProjects(config.GetListOrganisation())
|
||||
if err != nil {
|
||||
fmt.Println("Error:", err)
|
||||
@ -45,8 +48,10 @@ var ListCmd = &cobra.Command{
|
||||
fmt.Println("Error:", err)
|
||||
return
|
||||
}
|
||||
fmt.Println("\nList of Organizations :")
|
||||
fmt.Println(utils.CreateLine(4))
|
||||
if !config.GetJsonFlag() {
|
||||
fmt.Println("\nList of Organizations :")
|
||||
fmt.Println(utils.CreateLine(4))
|
||||
}
|
||||
for _, org := range orgs {
|
||||
fmt.Print(org)
|
||||
}
|
||||
|
27
makefile
27
makefile
@ -6,21 +6,38 @@ GOTEST=$(GOCMD) test
|
||||
GOGET=$(GOCMD) get
|
||||
|
||||
# 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
|
||||
|
||||
build:
|
||||
$(GOBUILD) -o $(BINARY_NAME) -v
|
||||
# build
|
||||
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:
|
||||
$(GOTEST) -v ./...
|
||||
|
||||
clean:
|
||||
$(GOCLEAN)
|
||||
rm -f $(BINARY_NAME)
|
||||
powershell.exe -c "rm .\release\ -Recurse -Force"
|
||||
|
||||
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
|
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
|
||||
// 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"
|
||||
|
||||
// Version is a struct that contains the version number
|
||||
type Version struct {
|
||||
Major int
|
||||
Minor int
|
||||
@ -9,24 +13,31 @@ type Version struct {
|
||||
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 {
|
||||
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 {
|
||||
return fmt.Sprintf("%d", versionNumber.Major)
|
||||
}
|
||||
|
||||
// GetMinorVersion returns the minor version number as a string
|
||||
func GetMinorVersion() string {
|
||||
return fmt.Sprintf("%d", versionNumber.Minor)
|
||||
}
|
||||
|
||||
// GetPatchVersion returns the patch version number as a string
|
||||
func GetPatchVersion() string {
|
||||
return fmt.Sprintf("%d", versionNumber.Patch)
|
||||
}
|
||||
|
||||
// GetBuildVersion returns the build version number as a string
|
||||
func GetBuildVersion() string {
|
||||
return fmt.Sprintf("%d", versionNumber.Build)
|
||||
}
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user