1
0
mirror of https://github.com/openshift/installer.git synced 2026-02-05 06:46:36 +01:00
Files
installer/hack/tf-fmt.sh
Zeeshan Ali 84975f3d13 Make terraform fmt output diff
So that the output is more useful and actionable.
2019-07-09 18:24:12 +02:00

18 lines
416 B
Bash
Executable File

#!/bin/sh
# in prow, already in container, so no 'podman run'
if [ "$IS_CONTAINER" != "" ]; then
if [ "${#N}" -eq 0 ]; then
set -- -list -check -diff -write=false -recursive data/data/
fi
set -x
terraform fmt "${@}"
else
podman run --rm \
--env IS_CONTAINER=TRUE \
--volume "${PWD}:${PWD}:z" \
--workdir "${PWD}" \
quay.io/coreos/terraform-alpine:v0.12.0-rc1 \
./hack/tf-fmt.sh
fi