From d7babfa452d288d7976bfab39f889922d71ff70b Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Mon, 6 Nov 2023 16:54:34 -0500 Subject: [PATCH] ci(hpc): fetch and checkout detached head (#1429) * build from an isolated checkout on hpc * don't indiscriminately update branches --- .hpc/deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.hpc/deploy.sh b/.hpc/deploy.sh index b4edee4791b..b95b6c7f381 100755 --- a/.hpc/deploy.sh +++ b/.hpc/deploy.sh @@ -3,7 +3,7 @@ set -euxo pipefail # fetch and checkout latest -ssh -l "$SSH_USERNAME" "$SSH_HOSTNAME" "cd $MF6_PROJ_ROOT && git fetch $GIT_REMOTE && git checkout $GIT_BRANCH && git pull" +ssh -l "$SSH_USERNAME" "$SSH_HOSTNAME" "cd $MF6_PROJ_ROOT && git fetch $GIT_REMOTE && git checkout $GIT_REMOTE/$GIT_BRANCH" echo "Updated repository $MF6_PROJ_ROOT" # submit a job to build mf6 jobid=$(ssh -l "$SSH_USERNAME" "$SSH_HOSTNAME" "sbatch --account=$SLURM_ACCOUNT --reservation=$SLURM_RESERVATION --parsable -D $MF6_PROJ_ROOT $MF6_PROJ_ROOT/$BUILD_SCRIPT" | tail -n 1)