Skip to content

Commit

Permalink
Maintenance: Simplify GitHub sync script and include renovate branch …
Browse files Browse the repository at this point in the history
…exception.
  • Loading branch information
mgruner committed Jun 22, 2022
1 parent d7d86f9 commit e4b3399
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .gitlab/ci/pre.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- !reference [.scripts, source_rvm]
script:
- !reference [.scripts, bundle_install]
after_script: []

'write runner cache: nodejs':
stage: pre
Expand All @@ -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':
Expand All @@ -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:
Expand Down
14 changes: 2 additions & 12 deletions script/build/sync_repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit e4b3399

Please sign in to comment.