maj du currentdir
This commit is contained in:
parent
97466a8f71
commit
7d4d6cb0e7
15
Taskfile.yml
15
Taskfile.yml
@ -10,14 +10,19 @@ vars:
|
|||||||
GORUN: "{{.GOCMD}} run"
|
GORUN: "{{.GOCMD}} run"
|
||||||
GOTEST: "{{.GOCMD}} test -v"
|
GOTEST: "{{.GOCMD}} test -v"
|
||||||
GOCOVER: "{{.GOCMD}} test -v --cover"
|
GOCOVER: "{{.GOCMD}} test -v --cover"
|
||||||
|
|
||||||
|
# Variables to get version
|
||||||
VERSION:
|
VERSION:
|
||||||
sh: cd version/ && versionManager go version
|
sh: cd version/ && versionManager go version
|
||||||
|
|
||||||
|
## Binary name ##
|
||||||
WINDOWS_BINARY_NAME: ./release/windows/{{.VERSION}}/kode-starter.exe
|
WINDOWS_BINARY_NAME: ./release/windows/{{.VERSION}}/kode-starter.exe
|
||||||
LINUX_BINARY_NAME: ./release/linux/{{.VERSION}}/kode-starter
|
LINUX_BINARY_NAME: ./release/linux/{{.VERSION}}/kode-starter
|
||||||
|
|
||||||
# env:
|
# faire un build pour Windows sur linux il faut installer mingw-w64
|
||||||
GOOS: Linux
|
# sudo apt-get install mingw-w64
|
||||||
|
env:
|
||||||
|
GOOS: windows
|
||||||
GOARCH: amd64
|
GOARCH: amd64
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
@ -26,7 +31,7 @@ tasks:
|
|||||||
linux-version:
|
linux-version:
|
||||||
cmds:
|
cmds:
|
||||||
- "cd ./version/ && versionManager go build"
|
- "cd ./version/ && versionManager go build"
|
||||||
silent: true
|
# silent: true
|
||||||
|
|
||||||
## Build ##
|
## Build ##
|
||||||
linux-build:
|
linux-build:
|
||||||
@ -46,12 +51,12 @@ tasks:
|
|||||||
windows-version:
|
windows-version:
|
||||||
cmds:
|
cmds:
|
||||||
- "cd ./version/ && versionManager.exe go build"
|
- "cd ./version/ && versionManager.exe go build"
|
||||||
silent: true
|
# silent: true
|
||||||
|
|
||||||
windows-build:
|
windows-build:
|
||||||
cmds:
|
cmds:
|
||||||
- "{{.GOBUILD}} {{.WINDOWS_BINARY_NAME}} -v"
|
- "{{.GOBUILD}} {{.WINDOWS_BINARY_NAME}} -v"
|
||||||
silent: true
|
# silent: true
|
||||||
|
|
||||||
## change Build version and build
|
## change Build version and build
|
||||||
windows-vbuild:
|
windows-vbuild:
|
||||||
|
@ -440,7 +440,7 @@ func (c *Config) Init() {
|
|||||||
c.SetModifDate(modifDate)
|
c.SetModifDate(modifDate)
|
||||||
|
|
||||||
// set config file name
|
// set config file name
|
||||||
var configFileYmlName string = "config.yml"
|
var configFileYmlName string = utils.GetProgramDir() + "/config.yml"
|
||||||
c.SetConfigFileYmlName(configFileYmlName)
|
c.SetConfigFileYmlName(configFileYmlName)
|
||||||
|
|
||||||
// set token from environment variable
|
// set token from environment variable
|
||||||
|
BIN
release/linux/0.0.0.26/kode-starter
Executable file
BIN
release/linux/0.0.0.26/kode-starter
Executable file
Binary file not shown.
BIN
release/linux/0.0.0.27/kode-starter
Executable file
BIN
release/linux/0.0.0.27/kode-starter
Executable file
Binary file not shown.
@ -151,3 +151,18 @@ func ColorizeSubStrRed(s string, sub string) string {
|
|||||||
func DoubleBackSlash(s string) string {
|
func DoubleBackSlash(s string) string {
|
||||||
return strings.Replace(s, "\\", "\\\\", -1)
|
return strings.Replace(s, "\\", "\\\\", -1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// function that return the program current directory
|
||||||
|
func GetProgramDir() string {
|
||||||
|
|
||||||
|
// get the absolut path of the executable
|
||||||
|
ex, err := os.Executable()
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// get the directory of the executable
|
||||||
|
exPath := filepath.Dir(ex)
|
||||||
|
|
||||||
|
return exPath
|
||||||
|
}
|
||||||
|
@ -15,7 +15,7 @@ type Version struct {
|
|||||||
|
|
||||||
// version variable that will be set at build time by versionManager.exe
|
// version variable that will be set at build time by versionManager.exe
|
||||||
// *** DO NOT EDIT ***
|
// *** DO NOT EDIT ***
|
||||||
var versionNumber Version = Version{0, 0, 0, 26}
|
var versionNumber Version = Version{0, 0, 0, 28}
|
||||||
|
|
||||||
// GetFullVersion returns the full version number as a string
|
// GetFullVersion returns the full version number as a string
|
||||||
func GetFullVersion() string {
|
func GetFullVersion() string {
|
||||||
|
Loading…
Reference in New Issue
Block a user