Fix make build-deps

The amended script is now able to handle new dependency in the opam file.
It also abloe to handle `test` attributes.
This commit is contained in:
Grégoire Henry 2016-12-08 16:27:28 +01:00
parent 224e5d8c73
commit f7f5f21e46
2 changed files with 8 additions and 7 deletions

View File

@ -1,5 +1,6 @@
#! /bin/sh #! /bin/sh
OCAML_VERSION=4.03.0 OCAML_VERSION=4.03.0
if [ "$(ocaml -vnum)" != "${OCAML_VERSION}" ]; then if [ "$(ocaml -vnum)" != "${OCAML_VERSION}" ]; then
echo ; echo ;
@ -42,18 +43,18 @@ if [ ! -z "$pin" ] ; then
opam pin --yes add --no-action --dev-repo ocp-ocamlres opam pin --yes add --no-action --dev-repo ocp-ocamlres
opam pin --yes add --no-action --dev-repo ocplib-json-typed opam pin --yes add --no-action --dev-repo ocplib-json-typed
opam pin --yes add --no-action --dev-repo ocplib-resto opam pin --yes add --no-action --dev-repo ocplib-resto
## Force opam to take account of the new `tezos-deps.opam`
opam pin --yes remove tezos-deps
opam pin --yes add --no-action tezos-deps src opam pin --yes add --no-action tezos-deps src
fi fi
if [ ! -z "$depext" ] ; then if [ ! -z "$depext" ] ; then
## In our CI, this rule is executed as user 'root'
## The other rules are executed as user 'opam'.
opam list --installed depext || opam install depext opam list --installed depext || opam install depext
opam depext ${DEPEXTOPT} tezos-deps opam depext ${DEPEXTOPT} tezos-deps
fi fi
if [ ! -z "$install" ] ; then if [ ! -z "$install" ] ; then
if opam list --installed tezos-deps ; then opam install --build-test tezos-deps
opam upgrade $(opam list -s --required-by tezos-deps | grep -ve '^ocaml *$')
else
opam install tezos-deps
fi
fi fi

View File

@ -31,6 +31,6 @@ depends: [
"tyxml" "tyxml"
"js_of_ocaml" "js_of_ocaml"
"sodium" {>= "0.3.0"} "sodium" {>= "0.3.0"}
"kaputt" (* only for testing *) "kaputt" { test }
"bisect_ppx" (* only for testing *) "bisect_ppx" { test }
] ]