From 318373c7d864c88c5595e439a1630290c00f1c78 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Mon, 27 Feb 2023 09:58:28 +0100 Subject: [PATCH 1/3] Fix updater.sh --- .github/workflows/updater.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index 194313e..8e28168 100755 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -17,8 +17,8 @@ #================================================= # Fetching information -current_version=$(cat manifest.json | jq -j '.version|split("~")[0]') -repo=$(cat manifest.json | jq -j '.upstream.code|split("https://github.com/")[1]') +current_version=$(cat manifest.tome | jq -j '.version|split("~")[0]') +repo=$(cat manifest.toml | jq -j '.upstream.code|split("https://github.com/")[1]') # Some jq magic is needed, because the latest upstream release is not always the latest version (e.g. security patches for older versions) latest_release_json=$(curl --silent "https://codeberg.org/api/v1/repos/calckey/calckey/releases" | jq -r '[.[] | select( .prerelease != true )][0]') version=$(echo $latest_release_json | jq -r '.tag_name') @@ -129,7 +129,7 @@ done #================================================= # Replace new version in manifest -echo "$(jq -s --indent 4 ".[] | .version = \"$version~ynh1\"" manifest.json)" > manifest.json +echo "$(jq -s --indent 4 ".[] | .version = \"$version~ynh1\"" manifest.toml)" > manifest.toml # No need to update the README, yunohost-bot takes care of it From 5082e7f0e2d6ff9fec5cdef631cd0793b5bb93bb Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Mon, 27 Feb 2023 10:02:40 +0100 Subject: [PATCH 2/3] Update updater.sh --- .github/workflows/updater.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index 8e28168..8a57149 100755 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -17,7 +17,7 @@ #================================================= # Fetching information -current_version=$(cat manifest.tome | jq -j '.version|split("~")[0]') +current_version=$(cat manifest.toml | jq -j '.version|split("~")[0]') repo=$(cat manifest.toml | jq -j '.upstream.code|split("https://github.com/")[1]') # Some jq magic is needed, because the latest upstream release is not always the latest version (e.g. security patches for older versions) latest_release_json=$(curl --silent "https://codeberg.org/api/v1/repos/calckey/calckey/releases" | jq -r '[.[] | select( .prerelease != true )][0]') From c2c5b20c22fa3ffeb91acc7ef57cdc353aa4ed0d Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Tue, 28 Feb 2023 09:56:22 +0100 Subject: [PATCH 3/3] Fix updater.sh --- .github/workflows/updater.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index 8a57149..0ef3295 100755 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -10,15 +10,15 @@ # automatic actions when a new upstream release is detected. # Remove this exit command when you are ready to run this Action -#exit 1 +# exit 1 #================================================= # FETCHING LATEST RELEASE AND ITS ASSETS #================================================= # Fetching information -current_version=$(cat manifest.toml | jq -j '.version|split("~")[0]') -repo=$(cat manifest.toml | jq -j '.upstream.code|split("https://github.com/")[1]') +current_version=$(cat manifest.toml | tomlq -j '.version|split("~")[0]') +repo=$(cat manifest.toml | tomlq -j '.upstream.code|split("https://github.com/")[1]') # Some jq magic is needed, because the latest upstream release is not always the latest version (e.g. security patches for older versions) latest_release_json=$(curl --silent "https://codeberg.org/api/v1/repos/calckey/calckey/releases" | jq -r '[.[] | select( .prerelease != true )][0]') version=$(echo $latest_release_json | jq -r '.tag_name') @@ -129,7 +129,7 @@ done #================================================= # Replace new version in manifest -echo "$(jq -s --indent 4 ".[] | .version = \"$version~ynh1\"" manifest.toml)" > manifest.toml +echo "$(tomlq -s --indent 4 ".[] | .version = \"$version~ynh1\"" manifest.toml)" > manifest.toml # No need to update the README, yunohost-bot takes care of it