*.sh: Set sane bash options on shell scripts
Adding the following accross the project: ```bash /# exit immediately when a command fails set -e /# only exit with zero if all commands of the pipeline exit successfully set -o pipefail /# error on unset variables +set -u ```
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
# exit immediately when a command fails
|
||||
set -e
|
||||
# only exit with zero if all commands of the pipeline exit successfully
|
||||
set -o pipefail
|
||||
# error on unset variables
|
||||
set -u
|
||||
|
||||
# Detect if we are on mac or should use GNU base64 options
|
||||
case $(uname) in
|
||||
|
@@ -1,3 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
# exit immediately when a command fails
|
||||
set -e
|
||||
# only exit with zero if all commands of the pipeline exit successfully
|
||||
set -o pipefail
|
||||
# error on unset variables
|
||||
set -u
|
||||
|
||||
kubectl apply -f examples/example-app
|
||||
|
@@ -1,3 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
# exit immediately when a command fails
|
||||
set -e
|
||||
# only exit with zero if all commands of the pipeline exit successfully
|
||||
set -o pipefail
|
||||
# error on unset variables
|
||||
set -u
|
||||
|
||||
kubectl delete -f examples/example-app
|
||||
|
Reference in New Issue
Block a user