CI: use compatible options for diff.

Also install `ocp-indent` and embeds `.ocp-indent` in the docker
image.
This commit is contained in:
Grégoire Henry 2017-11-14 04:57:06 +01:00 committed by Grégoire
parent e37974c64f
commit 3eddca508b
3 changed files with 3 additions and 2 deletions

View File

@ -3,7 +3,7 @@ FROM $base_image
COPY src tezos/src COPY src tezos/src
COPY test tezos/test COPY test tezos/test
COPY scripts tezos/scripts COPY scripts tezos/scripts
COPY Makefile jbuild tezos.opam tezos/ COPY Makefile jbuild .ocp-indent tezos/
RUN sudo chown -R opam /home/opam/tezos && \ RUN sudo chown -R opam /home/opam/tezos && \
cd tezos && \ cd tezos && \

View File

@ -4,6 +4,7 @@ COPY scripts/install_build_deps.sh scripts/version.sh tezos/scripts/
COPY tezos.opam tezos/ COPY tezos.opam tezos/
RUN sudo apk update && \ RUN sudo apk update && \
opam config exec -- ./tezos/scripts/install_build_deps.sh && \ opam config exec -- ./tezos/scripts/install_build_deps.sh && \
opam install ocp-indent && \
sudo rm -f /var/cache/apk/* && \ sudo rm -f /var/cache/apk/* && \
rm -fr ~/.opam/log/ && \ rm -fr ~/.opam/log/ && \
rm -fr "$(opam config exec -- ocamlfind query stdlib)"/topdirs.cmi rm -fr "$(opam config exec -- ocamlfind query stdlib)"/topdirs.cmi

View File

@ -10,7 +10,7 @@ for f in ` find \( -name _build -or \
\( -name \*.ml -or -name \*.mli \) -print`; do \( -name \*.ml -or -name \*.mli \) -print`; do
ff=$(basename $f) ff=$(basename $f)
ocp-indent $f > $tmp_dir/$ff ocp-indent $f > $tmp_dir/$ff
diff -u --color $f $tmp_dir/$ff diff -U 3 $f $tmp_dir/$ff
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
failed=yes failed=yes
fi fi