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

Fetch branch before resetting to it.

parent 1c12b39c
No related branches found
No related tags found
1 merge request!7Fetch branch before resetting to it.
Pipeline #1077 passed
...@@ -152,6 +152,7 @@ async function main() { ...@@ -152,6 +152,7 @@ async function main() {
// 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 switch ${CI_COMMIT_BRANCH}` await $`git switch ${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}`
await $`git status` await $`git status`
await $`git remote set-url origin git@git.leximpact.dev:openfisca/openfisca-france-reforms.git` await $`git remote set-url origin git@git.leximpact.dev:openfisca/openfisca-france-reforms.git`
...@@ -196,6 +197,7 @@ async function main() { ...@@ -196,6 +197,7 @@ async function main() {
// 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 switch ${CI_COMMIT_BRANCH}` await $`git switch ${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}`
await $`git status` await $`git status`
await $`git remote set-url origin git@git.leximpact.dev:openfisca/openfisca-france-reforms.git` await $`git remote set-url origin git@git.leximpact.dev:openfisca/openfisca-france-reforms.git`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment