Update PlatformIO CI script (#4307)
This commit is contained in:
parent
9d547a8a44
commit
37a7fb3d6a
9
.github/scripts/install-platformio-esp32.sh
vendored
9
.github/scripts/install-platformio-esp32.sh
vendored
@ -12,19 +12,14 @@ echo "Installing Platform ESP32 ..."
|
|||||||
python -m platformio platform install https://github.com/platformio/platform-espressif32.git > /dev/null 2>&1
|
python -m platformio platform install https://github.com/platformio/platform-espressif32.git > /dev/null 2>&1
|
||||||
|
|
||||||
echo "Replacing the framework version ..."
|
echo "Replacing the framework version ..."
|
||||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
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()"
|
||||||
sed 's/https:\/\/github\.com\/espressif\/arduino-esp32\.git/*/' "$HOME/.platformio/platforms/espressif32/platform.json" > "platform.json"
|
|
||||||
mv -f "platform.json" "$HOME/.platformio/platforms/espressif32/platform.json"
|
|
||||||
else
|
|
||||||
sed -i 's/https:\/\/github\.com\/espressif\/arduino-esp32\.git/*/' "$HOME/.platformio/platforms/espressif32/platform.json"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$GITHUB_REPOSITORY" == "espressif/arduino-esp32" ]; then
|
if [ "$GITHUB_REPOSITORY" == "espressif/arduino-esp32" ]; then
|
||||||
echo "Linking Core..."
|
echo "Linking Core..."
|
||||||
ln -s $GITHUB_WORKSPACE "$PLATFORMIO_ESP32_PATH"
|
ln -s $GITHUB_WORKSPACE "$PLATFORMIO_ESP32_PATH"
|
||||||
else
|
else
|
||||||
echo "Cloning Core Repository ..."
|
echo "Cloning Core Repository ..."
|
||||||
git clone https://github.com/espressif/arduino-esp32.git "$PLATFORMIO_ESP32_PATH" > /dev/null 2>&1
|
git clone --recursive https://github.com/espressif/arduino-esp32.git "$PLATFORMIO_ESP32_PATH" > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "PlatformIO for ESP32 has been installed"
|
echo "PlatformIO for ESP32 has been installed"
|
||||||
|
Loading…
Reference in New Issue
Block a user