File tree 1 file changed +11
-4
lines changed
1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,15 @@ commands:
30
30
shell : /bin/bash
31
31
name : Setup branch
32
32
command : |
33
- if [ "$CIRCLE_BRANCH" = "develop" ]; then
34
- git branch --set-upstream-to=origin/develop develop
33
+ sudo apt install jq
34
+ echo $CIRCLE_PR_REPONAME
35
+ url="https://api.github.com/repos/Open-IoT-Service-Platform/$CIRCLE_PROJECT_REPONAME/pulls/$CIRCLE_PR_NUMBER?access_token=$GITHUB_TOKEN"
36
+ target_branch=$(curl "$url" | ./jq '.base.ref' | tr -d '"')
37
+ echo Marcel822 ${target_branch}
38
+ if [ ! "$CIRCLE_BRANCH" = "master" ]; then
39
+ git branch --set-upstream-to=origin/${CIRCLE_BRANCH} ${CIRCLE_BRANCH}
40
+ fi
41
+ if [ "$CIRCLE_BRANCH" = "develop"]; then
35
42
make update
36
43
fi
37
44
build-branch :
@@ -123,8 +130,8 @@ workflows:
123
130
- build :
124
131
filters :
125
132
branches :
126
- only :
127
- - develop
133
+ ignore :
134
+ - master
128
135
- build-master :
129
136
filters :
130
137
branches :
You can’t perform that action at this time.
0 commit comments