From 3e6eb14ff8cf9616ec5da1b56f109d9da564ff80 Mon Sep 17 00:00:00 2001 From: Elias Chetouane <elias.chetouane@univ-grenoble-alpes.fr> Date: Fri, 23 Feb 2024 14:40:57 +0100 Subject: [PATCH] =?UTF-8?q?Modification=20des=20d=C3=A9placements=20dans?= =?UTF-8?q?=20les=20r=C3=A9pertoires=20pour=20permettre=20le=20git=20pull?= =?UTF-8?q?=20et=20revenir=20en=20arri=C3=A8re=20par=20"cd=20-".?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ac9d3b8..3e48fc2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,10 +30,8 @@ actualisation_dois: - git push origin HEAD:${CI_COMMIT_REF_NAME} # création d'un espace accueillant le clone du repo du site web, et tests au cas où l'espace existe déjà - - cd .. - - if ! [ -d "cloned_repo" ]; then mkdir cloned_repo; fi - - cd cloned_repo - - if [ -d "${PATH_TO_PUSH}" ]; then git pull; else git clone ${LINK_TO_CLONE}; fi + - if ! [ -d "../cloned_repo" ]; then mkdir ../cloned_repo; fi + - if [ -d "../cloned_repo/${PATH_TO_PUSH}" ]; then cd ../cloned_repo/${PATH_TO_PUSH}; git pull; else cd ../cloned_repo; git clone ${LINK_TO_CLONE}; fi - cd - # copier le fichier "nb-dois.txt" pour commit dans le repo du site web - cp open-research-data-monitor-back/1-enrich-with-datacite/nb-dois.txt cloned_repo/${PATH_TO_PUSH} -- GitLab