You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by se...@apache.org on 2023/04/26 18:08:10 UTC

[comdev-site] branch preview/test3 updated: Try remote fetch

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch preview/test3
in repository https://gitbox.apache.org/repos/asf/comdev-site.git


The following commit(s) were added to refs/heads/preview/test3 by this push:
     new bac1c83  Try remote fetch
bac1c83 is described below

commit bac1c83887198e769b0b0d0da4787afbd9570dfe
Author: Sebb <se...@apache.org>
AuthorDate: Wed Apr 26 19:08:02 2023 +0100

    Try remote fetch
---
 Jenkinsfile | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 6f3a72c..38b6ed1 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -87,18 +87,16 @@ pipeline {
                 script {
                     // Checkout branch with generated content, creating it if necessary
                     sh """
+                        git branch
                         if git checkout ${DEPLOY_BRANCH}
                         then
                           git pull origin ${DEPLOY_BRANCH}
                         else
                           echo "branch ${DEPLOY_BRANCH} is new; create basic site"
-                          git branch
                           git checkout --orphan ${DEPLOY_BRANCH} -f
                           git rm -rf .
-                          git fetch
-                          git branch
                           # assume we have an asf.yaml file
-                          git checkout ${BRANCH_NAME} -- .asf.yaml -f
+                          git checkout origin/${BRANCH_NAME} -- .asf.yaml -f
                           git add .asf.yaml -f
                         fi
                     """