Skip to content

Commit

Permalink
Support PRs in clone script (#61)
Browse files Browse the repository at this point in the history
fix ci for PRs
  • Loading branch information
anuejn authored Feb 27, 2019
2 parents 5e993e0 + f2db345 commit ada6289
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@ docker_builder:
matrix:
DEVICE: beta
DEVICE: micro
clone_script:
- git clone --recursive --branch=$CIRRUS_BRANCH https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
- git reset --hard $CIRRUS_CHANGE_IN_REPO
clone_script: >
if [[ -z "$CIRRUS_PR" ]]; then
git clone --recursive --branch=$CIRRUS_BRANCH https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
git reset --hard $CIRRUS_CHANGE_IN_REPO
else
git clone --recursive https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
git fetch origin pull/$CIRRUS_PR/head:pull/$CIRRUS_PR
git reset --hard $CIRRUS_CHANGE_IN_REPO
fi
make_script: ./makefiles/docker-make.sh DEVICE=$DEVICE
test_script: ./makefiles/docker-make.sh DEVICE=$DEVICE test
release_script: >
Expand Down

0 comments on commit ada6289

Please sign in to comment.