summarylogtreecommitdiffstats
path: root/hrDiff
blob: e64f0d5b444828dff75c8611b3f11ca49bc481ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env bash
HELMRELEASE="$(dirname "$0")/helmrelease"

if [[ -o xtrace ]]; then
  export XTRACE=true
fi

if [[ "$1" == "--help" || "$1" == "-h" ]]; then
  "$HELMRELEASE" --help diff
  exit 0
fi

# this flag doesn't work with the dry-run switch
if [[ "$*" == *"--allow-unreleased"* || "$*" == *"--install"* ]]; then
  HELM_DIFF_USE_UPGRADE_DRY_RUN=false
  HELM_DIFF_USE_INSECURE_SERVER_SIDE_DRY_RUN=false
fi
export HELM_DIFF_USE_UPGRADE_DRY_RUN="${HELM_DIFF_USE_UPGRADE_DRY_RUN:-true}"
export HELM_DIFF_USE_INSECURE_SERVER_SIDE_DRY_RUN="${HELM_DIFF_USE_INSECURE_SERVER_SIDE_DRY_RUN:-true}"
export HELM_DIFF_COLOR="${HELM_DIFF_COLOR:-true}"
exec "$HELMRELEASE" "diff" "$@"