diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index 4b69443..d6dca7a 100644 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -19,8 +19,8 @@ # Fetching information #app=$(cat manifest.json | jq -j '.id') #current_version=$(cat manifest.json | jq -j '.version|split("~")[0]') -app=$(cat manifest.toml | awk -v key="id" '$1 == key { gsub("\"","",$3);print $3 }') -current_version=$(cat manifest.toml | awk -v key="version" '$1 == key { gsub("\"","",$3);print $3 }' | awk -F'~' '{print $1}') +app=$(cat manifest.toml | tomlq -j '.id') +current_version=$(cat manifest.toml | tomlq -j '.version|split("~")[0]') upstream_version=$(curl -Ls https://pypi.org/pypi/$app/json | jq -r .info.version) # Setting up the environment variables @@ -52,8 +52,7 @@ sed -i "s/^app_version=.*/app_version=$upstream_version/" scripts/_common.sh #================================================= # Replace new version in manifest -#echo "$(jq -s --indent 4 ".[] | .version = \"$upstream_version~ynh1\"" manifest.json)" > manifest.json -sed -i "s/^version = .*/version = \"$upstream_version~ynh1\"/" manifest.toml +echo "$(tomlq -s --indent 4 ".[] | .version = \"$upstream_version~ynh1\"" manifest.toml)" > manifest.toml # No need to update the README, yunohost-bot takes care of it