Browse Source

Maintenance: Simplify GitHub sync script and include renovate branch exception.

Martin Gruner 2 years ago
parent
commit
e4b3399ebc
2 changed files with 5 additions and 12 deletions
  1. 3 0
      .gitlab/ci/pre.yml
  2. 2 12
      script/build/sync_repo.sh

+ 3 - 0
.gitlab/ci/pre.yml

@@ -6,6 +6,7 @@
     - !reference [.scripts, source_rvm]
   script:
     - !reference [.scripts, bundle_install]
+  after_script: []
 
 'write runner cache: nodejs':
   stage: pre
@@ -16,6 +17,7 @@
     - yarn storybook:install
     - yarn cypress:install
     - yarn --cwd ./.eslint-plugin-zammad install
+  after_script: []
 
 # Executed on a dedicated runner.
 'push to github':
@@ -30,6 +32,7 @@
   script:
     - git fetch --unshallow
     - script/build/sync_repo.sh git@github.com:zammad/zammad.git
+  after_script: []
 
 'refresh global envs':
   extends:

+ 2 - 12
script/build/sync_repo.sh

@@ -6,18 +6,8 @@ GITHUB_DEST=$1
 
 git remote prune origin
 
-if echo $CI_BUILD_REF_NAME | grep private; then
-  echo 'sync no private branches'
-  exit 0
-fi
-
-if echo $CI_BUILD_REF_NAME | grep cherry-pick-; then
-  echo 'sync no cherry-pick branches'
-  exit 0
-fi
-
-if echo $CI_BUILD_REF_NAME | grep dependabot/; then
-  echo 'sync no dependabot branches'
+if echo $CI_BUILD_REF_NAME | grep -E "^(private|cherry-pick-|renovate/|dependabot/)"; then
+  echo 'Do not sync internal branches.'
   exit 0
 fi