Files
esp-mqtt/ci/set_idf.sh
T
David Cermak 0bafcc5188 ci: Add IDF v4.2 to build tests
Also fixes build issues when default config carried over IDF releases --
always remove previous `sdkconfig` before a new build
2020-07-30 16:54:00 +02:00

20 lines
568 B
Bash
Executable File

#!/usr/bin/env bash
# sets up the IDF repo incl submodules with specified version as $1
set -o errexit # Exit if command failed.
if [ -z $IDF_PATH ] || [ -z $MQTT_PATH ] || [ -z $1 ] ; then
echo "Mandatory variables undefined"
exit 1;
fi;
echo "Checking out IDF version $1"
cd $IDF_PATH
# Cleans out the untracked files in the repo, so the next "git checkout" doesn't fail
git clean -f
git checkout $1
# Removes the mqtt submodule, so the next submodule update doesn't fail
rm -rf $IDF_PATH/components/mqtt/esp-mqtt
git submodule update --init --recursive