fix: remove toml parser in favour of sed

This commit is contained in:
ZanzyTHEbar 2023-03-21 13:55:40 +00:00
parent b639d9a530
commit 94682d86f8

View File

@ -48,17 +48,17 @@ tmp=$(mktemp)
jq --arg a "$nextReleaseVersion" '.version = $a' ./ESP/lib/library.json > "$tmp" && mv "$tmp" ./ESP/lib/library.json -f jq --arg a "$nextReleaseVersion" '.version = $a' ./ESP/lib/library.json > "$tmp" && mv "$tmp" ./ESP/lib/library.json -f
printf "[prepareCMD.sh]: Done \n" printf "[prepareCMD.sh]: Done, moving on to next files \n"
printf "[prepareCMD.sh]: Installing the dependencies for the ini file \n" sed -i -e "/^\[env\]/,/^\[.*\]/ s|^\(custom_firmware_version[ \t]*=[ \t]*\).*$|\1$nextReleaseVersion|" "./ESP/ini/dev_config.ini"
pip3 install yq #pip3 install yq
#
export PATH="~/.local/bin:$PATH" #export PATH="~/.local/bin:$PATH"
source ~/.bashrc #source ~/.bashrc
#
tmp=$(mktemp) #tmp=$(mktemp)
tomlq -t --arg version "$nextReleaseVersion" '.env.custom_firmware_version |= $version' ./ESP/ini/dev_config.ini > "$tmp" && mv "$tmp" ./ESP/ini/dev_config.ini -f #tomlq -t --arg version "$nextReleaseVersion" '.env.custom_firmware_version |= $version' ./ESP/ini/dev_config.ini > "$tmp" && mv "$tmp" ./ESP/ini/dev_config.ini -f
printf "[prepareCMD.sh]: Done, continuing with release. \n" printf "[prepareCMD.sh]: Done, continuing with release. \n"