From 3eddca508b3c4448d5d5650a762de2f5f6f28545 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Henry?= Date: Tue, 14 Nov 2017 04:57:06 +0100 Subject: [PATCH] CI: use compatible options for `diff`. Also install `ocp-indent` and embeds `.ocp-indent` in the docker image. --- scripts/Dockerfile.build.in | 2 +- scripts/Dockerfile.build_deps.in | 1 + scripts/test-ocp-indent.sh | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/Dockerfile.build.in b/scripts/Dockerfile.build.in index 855973b21..a230e4f91 100644 --- a/scripts/Dockerfile.build.in +++ b/scripts/Dockerfile.build.in @@ -3,7 +3,7 @@ FROM $base_image COPY src tezos/src COPY test tezos/test COPY scripts tezos/scripts -COPY Makefile jbuild tezos.opam tezos/ +COPY Makefile jbuild .ocp-indent tezos/ RUN sudo chown -R opam /home/opam/tezos && \ cd tezos && \ diff --git a/scripts/Dockerfile.build_deps.in b/scripts/Dockerfile.build_deps.in index 4608af8f4..eff41fa89 100644 --- a/scripts/Dockerfile.build_deps.in +++ b/scripts/Dockerfile.build_deps.in @@ -4,6 +4,7 @@ COPY scripts/install_build_deps.sh scripts/version.sh tezos/scripts/ COPY tezos.opam tezos/ RUN sudo apk update && \ opam config exec -- ./tezos/scripts/install_build_deps.sh && \ + opam install ocp-indent && \ sudo rm -f /var/cache/apk/* && \ rm -fr ~/.opam/log/ && \ rm -fr "$(opam config exec -- ocamlfind query stdlib)"/topdirs.cmi diff --git a/scripts/test-ocp-indent.sh b/scripts/test-ocp-indent.sh index 6d3574660..ab032197e 100755 --- a/scripts/test-ocp-indent.sh +++ b/scripts/test-ocp-indent.sh @@ -10,7 +10,7 @@ for f in ` find \( -name _build -or \ \( -name \*.ml -or -name \*.mli \) -print`; do ff=$(basename $f) ocp-indent $f > $tmp_dir/$ff - diff -u --color $f $tmp_dir/$ff + diff -U 3 $f $tmp_dir/$ff if [ $? -ne 0 ]; then failed=yes fi