Skip to content
This repository has been archived by the owner on Dec 21, 2019. It is now read-only.

Commit

Permalink
fix main: Exit with kubectl status code
Browse files Browse the repository at this point in the history
If kubectl fails during a kontemplate run, kontemplate should also
exit with a non-zero status code.

This fixes #43
  • Loading branch information
tazjin committed May 8, 2017
1 parent 20ccc33 commit cb6413b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -ueo pipefail

readonly GIT_HASH="$(git rev-parse --short HEAD)"
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() {
local os="${1}"
Expand Down
6 changes: 2 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"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
var gitHash string
Expand Down Expand Up @@ -155,7 +155,5 @@ func runKubectlWithResources(c *context.Context, kubectlArgs *[]string, resource
}
stdin.Close()

kubectl.Wait()

return nil
return kubectl.Wait()
}

0 comments on commit cb6413b

Please sign in to comment.