fix main: Exit with kubectl status code
If kubectl fails during a kontemplate run, kontemplate should also exit with a non-zero status code. This fixes #43
This commit is contained in:
parent
20ccc33347
commit
cb6413bff7
2 changed files with 3 additions and 5 deletions
|
@ -3,7 +3,7 @@ set -ueo pipefail
|
||||||
|
|
||||||
readonly GIT_HASH="$(git rev-parse --short HEAD)"
|
readonly GIT_HASH="$(git rev-parse --short HEAD)"
|
||||||
readonly LDFLAGS="-X main.gitHash=${GIT_HASH} -w -s"
|
readonly LDFLAGS="-X main.gitHash=${GIT_HASH} -w -s"
|
||||||
readonly VERSION="1.0-${GIT_HASH}"
|
readonly VERSION="1.0.1-${GIT_HASH}"
|
||||||
|
|
||||||
function build-for() {
|
function build-for() {
|
||||||
local os="${1}"
|
local os="${1}"
|
||||||
|
|
6
main.go
6
main.go
|
@ -11,7 +11,7 @@ import (
|
||||||
"gopkg.in/alecthomas/kingpin.v2"
|
"gopkg.in/alecthomas/kingpin.v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
const version string = "1.0"
|
const version string = "1.0.1"
|
||||||
|
|
||||||
// This variable will be initialised by the Go linker during the builder
|
// This variable will be initialised by the Go linker during the builder
|
||||||
var gitHash string
|
var gitHash string
|
||||||
|
@ -155,7 +155,5 @@ func runKubectlWithResources(c *context.Context, kubectlArgs *[]string, resource
|
||||||
}
|
}
|
||||||
stdin.Close()
|
stdin.Close()
|
||||||
|
|
||||||
kubectl.Wait()
|
return kubectl.Wait()
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue