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"
|
||||
GOTEST: "{{.GOCMD}} test -v"
|
||||
GOCOVER: "{{.GOCMD}} test -v --cover"
|
||||
|
||||
# Variables to get version
|
||||
VERSION:
|
||||
sh: cd version/ && versionManager go version
|
||||
|
||||
## Binary name ##
|
||||
WINDOWS_BINARY_NAME: ./release/windows/{{.VERSION}}/kode-starter.exe
|
||||
LINUX_BINARY_NAME: ./release/linux/{{.VERSION}}/kode-starter
|
||||
|
||||
# env:
|
||||
GOOS: Linux
|
||||
# faire un build pour Windows sur linux il faut installer mingw-w64
|
||||
# sudo apt-get install mingw-w64
|
||||
env:
|
||||
GOOS: windows
|
||||
GOARCH: amd64
|
||||
|
||||
tasks:
|
||||
@ -26,7 +31,7 @@ tasks:
|
||||
linux-version:
|
||||
cmds:
|
||||
- "cd ./version/ && versionManager go build"
|
||||
silent: true
|
||||
# silent: true
|
||||
|
||||
## Build ##
|
||||
linux-build:
|
||||
@ -46,12 +51,12 @@ tasks:
|
||||
windows-version:
|
||||
cmds:
|
||||
- "cd ./version/ && versionManager.exe go build"
|
||||
silent: true
|
||||
# silent: true
|
||||
|
||||
windows-build:
|
||||
cmds:
|
||||
- "{{.GOBUILD}} {{.WINDOWS_BINARY_NAME}} -v"
|
||||
silent: true
|
||||
# silent: true
|
||||
|
||||
## change Build version and build
|
||||
windows-vbuild:
|
||||
|
@ -440,7 +440,7 @@ func (c *Config) Init() {
|
||||
c.SetModifDate(modifDate)
|
||||
|
||||
// set config file name
|
||||
var configFileYmlName string = "config.yml"
|
||||
var configFileYmlName string = utils.GetProgramDir() + "/config.yml"
|
||||
c.SetConfigFileYmlName(configFileYmlName)
|
||||
|
||||
// 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 {
|
||||
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
|
||||
// *** 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
|
||||
func GetFullVersion() string {
|
||||
|
Loading…
Reference in New Issue
Block a user