Skip to content
Snippets Groups Projects
Commit 899ab29f authored by Emmanuel Raviart's avatar Emmanuel Raviart
Browse files

Harden reset of git repository.

parent 2bb44685
Branches
Tags
No related merge requests found
...@@ -441,6 +441,7 @@ function objectFromVersion( ...@@ -441,6 +441,7 @@ function objectFromVersion(
async function resetGitRepository() { async function resetGitRepository() {
// Reset current repo, because it may have been tranformed by a previous CI that failed. // Reset current repo, because it may have been tranformed by a previous CI that failed.
await $`git reset --hard`
await $`git switch ${CI_COMMIT_BRANCH}` await $`git switch ${CI_COMMIT_BRANCH}`
await $`git fetch origin ${CI_COMMIT_BRANCH}` await $`git fetch origin ${CI_COMMIT_BRANCH}`
await $`git reset --hard origin/${CI_COMMIT_BRANCH}` await $`git reset --hard origin/${CI_COMMIT_BRANCH}`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment