File tree Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 12
12
13
13
pushd server
14
14
npm install
15
- ./scripts/update-operators.sh $COMMUNITY_REPO || exit 1
15
+ ./scripts/update-operators.sh $COMMUNITY_REPO $COMMUNITY_BRANCH || exit 1
16
16
popd
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
3
- if [ ! -d " data/community-operators" ]; then
4
- pushd ./data/
3
+ pushd ./data/
5
4
5
+ if [ ! -d " community-operators" ]; then
6
+
6
7
if [ ! $1 ]; then
7
8
echo " Using default community operators repository"
8
9
OPERATORS_REPO=https://github.com/operator-framework/community-operators.git
9
10
else
10
11
OPERATORS_REPO=$1
12
+ echo " Using $OPERATORS_REPO as community operators repository"
11
13
fi
12
14
13
15
git clone $OPERATORS_REPO community-operators || exit 1
14
- popd
16
+ fi
15
17
16
- exit 0
18
+ if [ ! $2 ]; then
19
+ echo " Using master branch"
20
+ OPERATORS_BRANCH=master
21
+ else
22
+ OPERATORS_BRANCH=$2
23
+ echo " Using $OPERATORS_BRANCH branch"
17
24
fi
18
25
19
- pushd data/ community-operators
20
- git fetch origin master
21
- git pull origin master
26
+ pushd community-operators
27
+ git fetch origin $OPERATORS_BRANCH
28
+ git pull origin $OPERATORS_BRANCH
22
29
popd
23
30
31
+ popd
24
32
exit 0
You can’t perform that action at this time.
0 commit comments