From 39b731b46c369fc49dde41ebeeb7a56c48e0933a Mon Sep 17 00:00:00 2001 From: Daniel Ruggeri Date: Thu, 7 Apr 2022 19:17:31 +0000 Subject: [PATCH] Add a handy helper rc script to allow easy local dev --- scripts/set-local-testing.rc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 scripts/set-local-testing.rc diff --git a/scripts/set-local-testing.rc b/scripts/set-local-testing.rc new file mode 100644 index 00000000..55d7dee7 --- /dev/null +++ b/scripts/set-local-testing.rc @@ -0,0 +1,17 @@ +if [ ! -f README.md ];then + echo "Run this command from the root of the project directory" +else + FILE="dev.tfrc" + CFG=`realpath $FILE` + ROOTDIR=`dirname $CFG` + + echo " +provider_installation { + dev_overrides { + \"Mastercard/restapi\" = \"$ROOTDIR\" + } +} +" > "$FILE" + + export TF_CLI_CONFIG_FILE="$CFG" +fi