From 530cb256425e4193bdf85f37509a463b03f84cc2 Mon Sep 17 00:00:00 2001 From: Tony Hsu Date: Wed, 10 Jul 2024 17:20:33 +0200 Subject: [PATCH] `git fetch` before rev-parse --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 56963f3b861..ba6ff5396bd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -242,8 +242,9 @@ save_versions: - when: manual allow_failure: true script: - - echo 1_X_COMMIT_SHA=$(git rev-parse 1.x-stable) >> upstream.env - - echo 2_X_COMMIT_SHA=$(git rev-parse master) >> upstream.env + - git fetch --all + - echo 1_X_COMMIT_SHA=$(git rev-parse origin/1.x-stable) >> upstream.env + - echo 2_X_COMMIT_SHA=$(git rev-parse origin/master) >> upstream.env artifacts: paths: - upstream.env