From 06d360d77c22e6b1e34c79d1a0f4c26f5eebd985 Mon Sep 17 00:00:00 2001 From: ewilly Date: Fri, 3 Mar 2023 09:51:33 +0100 Subject: [PATCH] Untill I find a way to install toml executable --- .github/workflows/updater.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index d6dca7a..5635e68 100644 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -17,10 +17,11 @@ #================================================= # Fetching information -#app=$(cat manifest.json | jq -j '.id') -#current_version=$(cat manifest.json | jq -j '.version|split("~")[0]') -app=$(cat manifest.toml | tomlq -j '.id') -current_version=$(cat manifest.toml | tomlq -j '.version|split("~")[0]') +#TODO : find a way to install tomlq executable +#app=$(cat manifest.toml | tomlq -j '.id') +#current_version=$(cat manifest.toml | tomlq -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}') upstream_version=$(curl -Ls https://pypi.org/pypi/$app/json | jq -r .info.version) # Setting up the environment variables @@ -52,7 +53,9 @@ sed -i "s/^app_version=.*/app_version=$upstream_version/" scripts/_common.sh #================================================= # Replace new version in manifest -echo "$(tomlq -s --indent 4 ".[] | .version = \"$upstream_version~ynh1\"" manifest.toml)" > manifest.toml +#TODO : find a way to install tomlq executable +#echo "$(tomlq -s --indent 4 ".[] | .version = \"$upstream_version~ynh1\"" manifest.toml)" > manifest.toml +sed -i "s/^version = .*/version = \"$upstream_version~ynh1\"/" manifest.toml # No need to update the README, yunohost-bot takes care of it