Skip to content

Commit dbcc142

Browse files
committed
Add file in sdk with all component versions
1 parent e4fd9cf commit dbcc142

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

Diff for: build.sh

+12-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,18 @@ fi
122122

123123
rm -rf build sdkconfig out
124124

125-
echo $(git -C $AR_COMPS/arduino describe --all --long) > version.txt
125+
# Add components version info
126+
mkdir -p "$AR_TOOLS/sdk" && rm -rf version.txt && rm -rf "$AR_TOOLS/sdk/versions.txt"
127+
component_version="esp-idf: "$(git -C "$IDF_PATH" symbolic-ref --short HEAD)" "$(git -C "$IDF_PATH" rev-parse --short HEAD)
128+
echo $component_version >> version.txt && echo $component_version >> "$AR_TOOLS/sdk/versions.txt"
129+
for component in `ls "$AR_COMPS"`; do
130+
if [ -d "$AR_COMPS/$component/.git" ] || [ -d "$AR_COMPS/$component/.github" ]; then
131+
component_version="$component: "$(git -C "$AR_COMPS/$component" symbolic-ref --short HEAD)" "$(git -C "$AR_COMPS/$component" rev-parse --short HEAD)
132+
echo $component_version >> version.txt && echo $component_version >> "$AR_TOOLS/sdk/versions.txt"
133+
fi
134+
done
135+
component_version="tinyusb: "$(git -C "$AR_COMPS/arduino_tinyusb/tinyusb" symbolic-ref --short HEAD)" "$(git -C "$AR_COMPS/arduino_tinyusb/tinyusb" rev-parse --short HEAD)
136+
echo $component_version >> version.txt && echo $component_version >> "$AR_TOOLS/sdk/versions.txt"
126137

127138
#targets_count=`jq -c '.targets[] | length' configs/builds.json`
128139
for target_json in `jq -c '.targets[]' configs/builds.json`; do

Diff for: tools/config.sh

+5-2
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,13 @@ function git_create_pr(){ # git_create_pr <branch> <title>
106106
local pr_target="$3"
107107
local pr_body=""
108108
for component in `ls "$AR_COMPS"`; do
109-
if [ ! $component == "arduino" ] && [ -d "$AR_COMPS/$component/.git" ]; then
110-
pr_body+="$component: "$(git -C "$AR_COMPS/$component" symbolic-ref --short HEAD)" "$(git -C "$AR_COMPS/$component" rev-parse --short HEAD)"\r\n"
109+
if [ ! $component == "arduino" ]; then
110+
if [ -d "$AR_COMPS/$component/.git" ] || [ -d "$AR_COMPS/$component/.github" ]; then
111+
pr_body+="$component: "$(git -C "$AR_COMPS/$component" symbolic-ref --short HEAD)" "$(git -C "$AR_COMPS/$component" rev-parse --short HEAD)"\r\n"
112+
fi
111113
fi
112114
done
115+
pr_body+="tinyusb: "$(git -C "$AR_COMPS/arduino_tinyusb/tinyusb" symbolic-ref --short HEAD)" "$(git -C "$AR_COMPS/arduino_tinyusb/tinyusb" rev-parse --short HEAD)"\r\n"
113116
local pr_data="{\"title\": \"$pr_title\", \"body\": \"$pr_body\", \"head\": \"$AR_USER:$pr_branch\", \"base\": \"$pr_target\"}"
114117
git_create_pr_res=`echo "$pr_data" | curl -k -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3.raw+json" --data @- "https://api.github.com/repos/$AR_REPO/pulls"`
115118
local done_pr=`echo "$git_create_pr_res" | jq -r '.title'`

0 commit comments

Comments
 (0)