File tree Expand file tree Collapse file tree 3 files changed +54
-0
lines changed Expand file tree Collapse file tree 3 files changed +54
-0
lines changed Original file line number Diff line number Diff line change @@ -43,4 +43,22 @@ function per_dir_hook_unique_part {
4343 return $exit_code
4444}
4545
46+ # ######################################################################
47+ # Unique part of `common::per_dir_hook`. The function is executed one time
48+ # in the root git repo
49+ # Arguments:
50+ # args (string with array) arguments that configure wrapped tool behavior
51+ # ######################################################################
52+ function run_hook_on_whole_repo {
53+ local -r args=" $1 "
54+
55+ # pass the arguments to hook
56+ # shellcheck disable=SC2068 # hook fails when quoting is used ("$arg[@]")
57+ tfsec " $( pwd) " ${args[@]}
58+
59+ # return exit code to common::per_dir_hook
60+ local exit_code=$?
61+ return $exit_code
62+ }
63+
4664[ " ${BASH_SOURCE[0]} " != " $0 " ] || main " $@ "
Original file line number Diff line number Diff line change @@ -40,4 +40,22 @@ function per_dir_hook_unique_part {
4040 return $exit_code
4141}
4242
43+ # ######################################################################
44+ # Unique part of `common::per_dir_hook`. The function is executed one time
45+ # in the root git repo
46+ # Arguments:
47+ # args (string with array) arguments that configure wrapped tool behavior
48+ # ######################################################################
49+ function run_hook_on_whole_repo {
50+ local -r args=" $1 "
51+
52+ # pass the arguments to hook
53+ # shellcheck disable=SC2068 # hook fails when quoting is used ("$arg[@]")
54+ terragrunt hclfmt " $( pwd) " ${args[@]}
55+
56+ # return exit code to common::per_dir_hook
57+ local exit_code=$?
58+ return $exit_code
59+ }
60+
4361[ " ${BASH_SOURCE[0]} " != " $0 " ] || main " $@ "
Original file line number Diff line number Diff line change @@ -40,4 +40,22 @@ function per_dir_hook_unique_part {
4040 return $exit_code
4141}
4242
43+ # ######################################################################
44+ # Unique part of `common::per_dir_hook`. The function is executed one time
45+ # in the root git repo
46+ # Arguments:
47+ # args (string with array) arguments that configure wrapped tool behavior
48+ # ######################################################################
49+ function run_hook_on_whole_repo {
50+ local -r args=" $1 "
51+
52+ # pass the arguments to hook
53+ # shellcheck disable=SC2068 # hook fails when quoting is used ("$arg[@]")
54+ terragrunt run-all validate ${args[@]}
55+
56+ # return exit code to common::per_dir_hook
57+ local exit_code=$?
58+ return $exit_code
59+ }
60+
4361[ " ${BASH_SOURCE[0]} " != " $0 " ] || main " $@ "
You can’t perform that action at this time.
0 commit comments