Skip to content

Commit 37a7fb3

Browse files
authored
Update PlatformIO CI script (#4307)
1 parent 9d547a8 commit 37a7fb3

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

Diff for: .github/scripts/install-platformio-esp32.sh

+2-7
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,14 @@ echo "Installing Platform ESP32 ..."
1212
python -m platformio platform install https://github.com/platformio/platform-espressif32.git > /dev/null 2>&1
1313

1414
echo "Replacing the framework version ..."
15-
if [[ "$OSTYPE" == "darwin"* ]]; then
16-
sed 's/https:\/\/github\.com\/espressif\/arduino-esp32\.git/*/' "$HOME/.platformio/platforms/espressif32/platform.json" > "platform.json"
17-
mv -f "platform.json" "$HOME/.platformio/platforms/espressif32/platform.json"
18-
else
19-
sed -i 's/https:\/\/github\.com\/espressif\/arduino-esp32\.git/*/' "$HOME/.platformio/platforms/espressif32/platform.json"
20-
fi
15+
python -c "import json; import os; fp=open(os.path.expanduser('~/.platformio/platforms/espressif32/platform.json'), 'r+'); data=json.load(fp); data['packages']['framework-arduinoespressif32']['version'] = '*'; del data['packages']['framework-arduinoespressif32']['owner']; fp.seek(0); fp.truncate(); json.dump(data, fp); fp.close()"
2116

2217
if [ "$GITHUB_REPOSITORY" == "espressif/arduino-esp32" ]; then
2318
echo "Linking Core..."
2419
ln -s $GITHUB_WORKSPACE "$PLATFORMIO_ESP32_PATH"
2520
else
2621
echo "Cloning Core Repository ..."
27-
git clone https://github.com/espressif/arduino-esp32.git "$PLATFORMIO_ESP32_PATH" > /dev/null 2>&1
22+
git clone --recursive https://github.com/espressif/arduino-esp32.git "$PLATFORMIO_ESP32_PATH" > /dev/null 2>&1
2823
fi
2924

3025
echo "PlatformIO for ESP32 has been installed"

0 commit comments

Comments
 (0)