Skip to content

Commit c124dad

Browse files
committed
add remote selectable arduino branch
1 parent 01dd1e9 commit c124dad

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

tools/repository_dispatch.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ payload=`echo "$EVENT_JSON" | jq -r '.client_payload'`
1111
branch=`echo "$payload" | jq -r '.branch'`
1212
commit=`echo "$payload" | jq -r '.commit'`
1313
builder=`echo "$payload" | jq -r '.builder'`
14+
arduino=`echo "$payload" | jq -r '.arduino'`
1415

1516
echo "Action: $action, Branch: $branch, Commit: $commit, Builder: $builder"
1617

@@ -34,6 +35,10 @@ if [ ! "$builder" == "" ] && [ ! "$builder" == "null" ]; then
3435
git checkout "$builder"
3536
fi
3637

38+
if [ ! "$arduino" == "" ] && [ ! "$arduino" == "null" ]; then
39+
export AR_BRANCH="$arduino"
40+
fi
41+
3742
source ./build.sh
3843

3944
if [ "$action" == "deploy" ]; then

tools/update-components.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ source ./tools/config.sh
88

99
if [ ! -d "$AR_COMPS/arduino" ]; then
1010
git clone $AR_REPO_URL "$AR_COMPS/arduino"
11+
if [ "$AR_BRANCH" ]; then
12+
git -C "$AR_COMPS/arduino" checkout "$AR_BRANCH"
13+
fi
1114
fi
1215
if [ $? -ne 0 ]; then exit 1; fi
1316

0 commit comments

Comments
 (0)