aboutsummaryrefslogtreecommitdiffhomepage
path: root/dev/ci/ci-common.sh
diff options
context:
space:
mode:
authorGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2017-03-22 17:17:33 +0100
committerGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2017-03-22 18:42:03 +0100
commit44b2c7979e1ea3a834f4e9bd2fcd631d568b895e (patch)
tree7eb3c252811753003942069bbb43586fbb1d2816 /dev/ci/ci-common.sh
parent8b73fd7c6ce423f8c8a2594e90200f2407795d52 (diff)
[travis] Fix iris-coq build.
We need to do a bit of hacking, but it should be fine for the short term. c.f. https://gitlab.mpi-sws.org/FP/iris-coq/issues/83
Diffstat (limited to 'dev/ci/ci-common.sh')
-rw-r--r--dev/ci/ci-common.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/dev/ci/ci-common.sh b/dev/ci/ci-common.sh
index c94f15026..2711b7eca 100644
--- a/dev/ci/ci-common.sh
+++ b/dev/ci/ci-common.sh
@@ -25,12 +25,16 @@ git_checkout()
local _URL=${2}
local _DEST=${3}
+ # Allow an optional 4th argument for the commit
+ local _COMMIT=${4:-FETCH_HEAD}
+ local _DEPTH=$(if [ -z "${4}" ]; then echo "--depth 1"; fi)
+
mkdir -p ${_DEST}
( cd ${_DEST} && \
- if [ ! -d .git ] ; then git clone --depth 1 ${_URL} . ; fi && \
+ if [ ! -d .git ] ; then git clone ${_DEPTH} ${_URL} . ; fi && \
echo "Checking out ${_DEST}" && \
git fetch ${_URL} ${_BRANCH} && \
- git checkout FETCH_HEAD && \
+ git checkout ${_COMMIT} && \
echo "${_DEST}: `git log -1 --format='%s | %H | %cd | %aN'`" )
}