aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorpaulrbr-fl <43074087+paulrbr-fl@users.noreply.github.com>2019-07-31 14:28:10 +0200
committerGitHub <noreply@github.com>2019-07-31 14:28:10 +0200
commite749969ff845089853920647b0da039938a2371c (patch)
tree42959db073ff88d2f5ddcd42ff97bc548d73bf05 /scripts
parent8305eb92f5bb6445868fda6d4e3075011d1fd248 (diff)
parentcc5df7bf9c44828219eaae6d6de111d4603e19a7 (diff)
downloadansible-clever-e749969ff845089853920647b0da039938a2371c.tar.gz
ansible-clever-e749969ff845089853920647b0da039938a2371c.tar.zst
ansible-clever-e749969ff845089853920647b0da039938a2371c.zip
Merge pull request #49 from paulrbr-fl/clever-deploy-back-to-polling
deploy: revert back to git push + polling
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/dhall_check.sh24
1 files changed, 9 insertions, 15 deletions
diff --git a/scripts/dhall_check.sh b/scripts/dhall_check.sh
index a3413ec..5a1ee1b 100755
--- a/scripts/dhall_check.sh
+++ b/scripts/dhall_check.sh
@@ -1,25 +1,19 @@
1#!/usr/bin/env bash 1#!/usr/bin/env bash
2 2
3pushd () { 3set -eo pipefail
4 command pushd "$@" > /dev/null
5}
6
7popd () {
8 command popd "$@" > /dev/null
9}
10 4
11go() { 5go() {
12 local ERROR=0; 6 local ERROR=0
13 for file in $(find -type f -name "*.dhall"); do 7 while IFS= read -r -d '' file
14 pushd $(dirname $file); 8 do
15 cat $(basename $file) | dhall --explain resolve > /dev/null; 9 cd "$(dirname "$file")" || exit
16 echo "Typechecking ${file}" 10 echo "Typechecking ${file}"
17 if [ "$?" -ne "0" ]; then 11 if ! dhall --explain resolve < "$(basename "$file")" >/dev/null; then
18 echo "Failed to resolve $file" 12 echo "Failed to resolve $file"
19 ERROR=1; 13 ERROR=1
20 fi; 14 fi;
21 popd; 15 cd - >/dev/null || exit
22 done; 16 done < <(find . -type f -name "*.dhall" -print0)
23 exit $ERROR; 17 exit $ERROR;
24} 18}
25 19