From ef2d05198b1cfc7138068b2e1832faaa97fd9a01 Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Fri, 10 Jul 2020 11:39:53 +0200 Subject: [PATCH] [PIO] Fix variants path changes Signed-off-by: Frederic Pillon --- .github/actions/pio-build/entrypoint.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/actions/pio-build/entrypoint.sh b/.github/actions/pio-build/entrypoint.sh index b51c1ba630..9eb99edadf 100755 --- a/.github/actions/pio-build/entrypoint.sh +++ b/.github/actions/pio-build/entrypoint.sh @@ -11,6 +11,15 @@ platformio platform install "https://github.com/platformio/platform-ststm32.git" python3 -c "import json; import os; fp=open(os.path.expanduser('~/.platformio/platforms/ststm32/platform.json'), 'r+'); data=json.load(fp); data['packages']['framework-arduinoststm32']['version'] = '*'; fp.seek(0); fp.truncate(); json.dump(data, fp); fp.close()" || { exit 1 } + +# Fix for variant path change while not updated in PIO +python3 -c "import json; import os; fp=open(os.path.expanduser('~/.platformio/platforms/ststm32/boards/remram_v1.json'), 'r+'); data=json.load(fp); data['build']['variant'] = 'STM32F7xx/REMRAM_V1'; fp.seek(0); fp.truncate(); json.dump(data, fp); fp.close()" || { + exit 1 +} +python3 -c "import json; import os; fp=open(os.path.expanduser('~/.platformio/platforms/ststm32/boards/blackpill_f103c8.json'), 'r+'); data=json.load(fp); data['build']['variant'] = 'STM32F1xx/PILL_F103XX'; fp.seek(0); fp.truncate(); json.dump(data, fp); fp.close()" || { + exit 1 +} + ln --symbolic "$GITHUB_WORKSPACE" "$HOME/.platformio/packages/framework-arduinoststm32" || { exit 1 }