chore: fix broken clone

This fixes and issue with cloning the master branch caused by git
refusing to fetch into the current branch.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
This commit is contained in:
Andrew Rynhard 2019-08-10 05:37:37 +00:00
parent 8786916fd0
commit 217b7e2f9d
2 changed files with 12 additions and 6 deletions

View File

@ -13,7 +13,8 @@ steps:
- name: clone
image: autonomy/build-container:latest
commands:
- git clone --depth 1 ${DRONE_REPO_LINK} .
- git init
- git remote add origin ${DRONE_REPO_LINK}
- git fetch origin ${DRONE_COMMIT_REF}:${DRONE_SOURCE_BRANCH}
- git checkout ${DRONE_SOURCE_BRANCH}
- git fetch --tags
@ -383,7 +384,8 @@ steps:
- name: clone
image: autonomy/build-container:latest
commands:
- git clone --depth 1 ${DRONE_REPO_LINK} .
- git init
- git remote add origin ${DRONE_REPO_LINK}
- git fetch origin ${DRONE_COMMIT_REF}:${DRONE_SOURCE_BRANCH}
- git checkout ${DRONE_SOURCE_BRANCH}
- git fetch --tags
@ -802,7 +804,8 @@ steps:
- name: clone
image: autonomy/build-container:latest
commands:
- git clone --depth 1 ${DRONE_REPO_LINK} .
- git init
- git remote add origin ${DRONE_REPO_LINK}
- git fetch origin ${DRONE_COMMIT_REF}:${DRONE_SOURCE_BRANCH}
- git checkout ${DRONE_SOURCE_BRANCH}
- git fetch --tags
@ -1223,7 +1226,8 @@ steps:
- name: clone
image: autonomy/build-container:latest
commands:
- git clone --depth 1 ${DRONE_REPO_LINK} .
- git init
- git remote add origin ${DRONE_REPO_LINK}
- git fetch origin ${DRONE_COMMIT_REF}:${DRONE_SOURCE_BRANCH}
- git checkout ${DRONE_SOURCE_BRANCH}
- git fetch --tags
@ -1644,7 +1648,8 @@ steps:
- name: clone
image: autonomy/build-container:latest
commands:
- git clone --depth 1 ${DRONE_REPO_LINK} .
- git init
- git remote add origin ${DRONE_REPO_LINK}
- git fetch origin ${DRONE_COMMIT_REF}:${DRONE_SOURCE_BRANCH}
- git checkout ${DRONE_SOURCE_BRANCH}
- git fetch --tags

View File

@ -58,7 +58,8 @@ local clone = {
name: "clone",
image: build_container,
commands: [
"git clone --depth 1 ${DRONE_REPO_LINK} .",
"git init",
"git remote add origin ${DRONE_REPO_LINK}",
"git fetch origin ${DRONE_COMMIT_REF}:${DRONE_SOURCE_BRANCH}",
"git checkout ${DRONE_SOURCE_BRANCH}",
"git fetch --tags",