Skip to content

Commit f683983

Browse files
authored
add sdkconfig entry at top in the file not at the end
1 parent 9ea537f commit f683983

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

.github/workflows/parallel_build.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,8 @@ jobs:
9595
sdkconfig_path="framework-arduinoespressif32/tools/esp32-arduino-libs/$mcu/sdkconfig"
9696
if [ -f "$sdkconfig_path" ]; then
9797
echo "Updating $sdkconfig_path with firmware version: $FIRMWARE_VERSION"
98-
# Remove existing CONFIG_ESP_HOSTED_IDF_SLAVE_TARGET line if it exists
99-
sed -i '/^CONFIG_ESP_HOSTED_IDF_SLAVE_TARGET/d' "$sdkconfig_path"
100-
# Add new CONFIG_ESP_HOSTED_IDF_SLAVE_TARGET line
101-
echo "CONFIG_ESP_HOSTED_IDF_SLAVE_TARGET=\"$FIRMWARE_VERSION\"" >> "$sdkconfig_path"
98+
# Remove existing CONFIG_ESP_HOSTED_IDF_SLAVE_TARGET line and add new one at the beginning
99+
sed -i -e '/^CONFIG_ESP_HOSTED_IDF_SLAVE_TARGET/d' -e "1i CONFIG_ESP_HOSTED_IDF_SLAVE_TARGET=\"$FIRMWARE_VERSION\"" "$sdkconfig_path"
102100
else
103101
echo "Warning: sdkconfig file not found at $sdkconfig_path"
104102
fi

0 commit comments

Comments
 (0)