[release] Fetch before checking out
@@ -194,7 +194,10 @@ pipeline {
dir("${BASE_DIR}") {
// restore git state before updating .x branch, otherwise later external scripts will use
// the version when the tag was created, which might not match the release branch state
- sh(script: "git checkout ${BRANCH_SPECIFIER}")
+ sh(script: """
+ git fetch origin ${BRANCH_SPECIFIER} # ensure remote branch is fetched for local checkout
+ git checkout --track origin/${BRANCH_SPECIFIER}
+ """)
}
}
}
