Skip to content

Commit 43e2f81

Browse files
committed
Handle individual import failures
1 parent 26feef1 commit 43e2f81

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/update-templates.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,24 @@ updateAll() {
1818

1919
for dir in ../*; do
2020
if [[ -d "$dir" ]]; then
21-
update "${dir#../}" "$wiremock_cloud_url" "$wiremock_cloud_username" "$wiremock_cloud_api_token"
21+
22+
set +e
23+
(update "${dir#../}" "$wiremock_cloud_url" "$wiremock_cloud_username" "$wiremock_cloud_api_token")
24+
local result=$?
25+
set -e
26+
27+
if [[ result -eq 0 ]]; then
28+
echo "Imported $dir"
29+
else
30+
>&2 echo "Failed to import $dir"
31+
fi
2232
fi
2333
done
2434
}
2535

2636
update() {
37+
set -euo pipefail
38+
2739
local dir=$1
2840
local wiremock_cloud_url=$2
2941
local wiremock_cloud_username=$3

0 commit comments

Comments
 (0)