From cf25c626e545c0ace9d394d5eb0a64049956ecdf Mon Sep 17 00:00:00 2001 From: Soonho Kong Date: Sun, 4 May 2014 17:49:32 -0400 Subject: [PATCH] chore(travis): fix bitbucket push Problem ======= For efficiency, travis-ci uses shallow clone by doing git clone --depth=50 ... which checks out recent 50 commits from the repo. However, recent changes on bitbucket side rejects a shallow clone of a repository. Solution ======== We do git fetch --unshallow; before we push to other repositories. --- .travis.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.travis.yml b/.travis.yml index e6ccab0cd..bd24747de 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,8 @@ env: - secure: "iZEcYPaxqGRQs7loHwO88DlewbRngBwoNGfo438jabh0adF3y9zCPw0tcAtp6IJuCw8E6QVoM9JMwoQRvPbnqBelFjpXH+U3eYdaeeZRkBkyOthTWzzdwEexlnK7dXVEc+gTDjh2NBD9juXKDSJ5xOF1HfhEJaMXSLairnhpL6k=" # COVERALLS_REPO_TOKEN=[secure] (from https://coveralls.io/r/leanprover/lean) - secure: "j14U5pV2qkArCTt4MdI+rYe9MzcIcoMYrPX3Kp4bFNAyxfTALHG25bZUaEyqBJKPevch02+i8hs3I/+b9Iue0j8be8hjy7GSKDEkhbd8HIWJMvMBM1Y+h88ZPTvTiEB9OCbHa6PrETN+3WO8cSe3PufWO7cwoOqzWuY440ZZqSM=" + # BB_TOKEN=[secure] (to push to https://bitbucket.org/leanprover/lean for backup & email diff) + - secure: "NvPi430kKhteshcxiYP4oHbMFaSiz6bmoENA55sxD7bI0EmsKvuRJFPfFr3g8gl9hNnuNABOTK4xNcWjNDRtHBjnGYHytyaYLEYjpNGTlmTzc21q/FheWL32K2rkvvaRa0ZrDt8p1k1lr07Z69oFFIGCigAdcTCEhMO9Clxlxts=" matrix: # ======================================================= # TESTCOV Build @@ -188,6 +190,10 @@ install: fi before_script: +- if [[ $REPO == BLESSED && $TRIGGER_BB == TRUE ]]; then + git fetch --unshallow; + git push -q https://soonhok:${BB_TOKEN}@bitbucket.org/leanprover/lean.git +HEAD:master; + fi - if [[ $REPO == BLESSED && $TRIGGER_OSX == TRUE ]]; then MSG=`git log --pretty=oneline --abbrev-commit -n 1 | cut -d ' ' -f 2-`; cp .travis.yml /tmp/.travis.temp.yml;