File tree 1 file changed +13
-6
lines changed
1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -18,19 +18,26 @@ if [ ! -d "$AR_COMPS/arduino" ]; then
18
18
fi
19
19
20
20
if [ -z $AR_BRANCH ]; then
21
- has_ar_branch= ` git_branch_exists " $AR_COMPS /arduino " " idf- $IDF_BRANCH " `
22
- if [ " $has_ar_branch " == " 1" ]; then
23
- export AR_BRANCH=" idf- $IDF_BRANCH "
21
+ current_branch= ` git branch --show-current `
22
+ if [[ " $current_branch " != " master " && ` git_branch_exists " $AR_COMPS /arduino " " $current_branch " ` == " 1" ] ]; then
23
+ export AR_BRANCH=" $current_branch "
24
24
else
25
- has_ar_branch=` git_branch_exists " $AR_COMPS /arduino" " $AR_PR_TARGET_BRANCH " `
25
+ has_ar_branch=` git_branch_exists " $AR_COMPS /arduino" " idf- $IDF_BRANCH " `
26
26
if [ " $has_ar_branch " == " 1" ]; then
27
- export AR_BRANCH=" $AR_PR_TARGET_BRANCH "
27
+ export AR_BRANCH=" idf-$IDF_BRANCH "
28
+ else
29
+ has_ar_branch=` git_branch_exists " $AR_COMPS /arduino" " $AR_PR_TARGET_BRANCH " `
30
+ if [ " $has_ar_branch " == " 1" ]; then
31
+ export AR_BRANCH=" $AR_PR_TARGET_BRANCH "
32
+ fi
28
33
fi
29
34
fi
30
35
fi
31
36
32
37
if [ " $AR_BRANCH " ]; then
33
- git -C " $AR_COMPS /arduino" checkout " $AR_BRANCH "
38
+ git -C " $AR_COMPS /arduino" checkout " $AR_BRANCH " && \
39
+ git -C " $AR_COMPS /arduino" fetch && \
40
+ git -C " $AR_COMPS /arduino" pull --ff-only
34
41
fi
35
42
if [ $? -ne 0 ]; then exit 1; fi
36
43
You can’t perform that action at this time.
0 commit comments