From 37a7fb3d6ada8a9230c96e2df999c95ef10fd4d3 Mon Sep 17 00:00:00 2001 From: Valerii Koval Date: Mon, 31 Aug 2020 18:06:34 +0300 Subject: [PATCH] Update PlatformIO CI script (#4307) --- .github/scripts/install-platformio-esp32.sh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/scripts/install-platformio-esp32.sh b/.github/scripts/install-platformio-esp32.sh index 65dc0c40..c065b0a0 100755 --- a/.github/scripts/install-platformio-esp32.sh +++ b/.github/scripts/install-platformio-esp32.sh @@ -12,19 +12,14 @@ echo "Installing Platform ESP32 ..." python -m platformio platform install https://github.com/platformio/platform-espressif32.git > /dev/null 2>&1 echo "Replacing the framework version ..." -if [[ "$OSTYPE" == "darwin"* ]]; then - 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 +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()" if [ "$GITHUB_REPOSITORY" == "espressif/arduino-esp32" ]; then echo "Linking Core..." ln -s $GITHUB_WORKSPACE "$PLATFORMIO_ESP32_PATH" else 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 echo "PlatformIO for ESP32 has been installed"