From 35981bcc8238ea8d481479bd1b77ee4f3c7efc6e Mon Sep 17 00:00:00 2001 From: Krakinou Date: Sat, 17 Dec 2022 14:01:25 +0100 Subject: [PATCH 1/6] change assets path to zipball_url --- .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 05f52a9..87c0b0c 100755 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -9,7 +9,7 @@ current_version=$(cat manifest.json | jq -j '.version|split("~")[0]') repo=$(cat manifest.json | 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) version=$(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '.[] | select( .prerelease != true ) | .tag_name' | sort -V | tail -1) -assets=($(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '[ .[] | select(.tag_name=="'$version'").assets[].browser_download_url ] | join(" ") | @sh' | tr -d "'")) +assets=($(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '[ .[] | select(.tag_name=="'$version'").zipball_url ] | join(" ") | @sh' | tr -d "'")) # Later down the script, we assume the version has only digits and dots # Sometimes the release name starts with a "v", so let's filter it out. From 3e40d55c4ccc3d1ffbdf8f52ccd41a40a0921de1 Mon Sep 17 00:00:00 2001 From: Krakinou Date: Sat, 17 Dec 2022 14:14:08 +0100 Subject: [PATCH 2/6] handle zipball assets --- .github/workflows/updater.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index 87c0b0c..633b91b 100755 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -53,14 +53,16 @@ echo "Handling asset at $asset_url" # Assign the asset to a source file in conf/ directory # Leave $src empty to ignore the asset -case $asset_url in - *"Source"*) - src="app" - ;; - *) - src="" - ;; -esac +#case $asset_url in +# *"Source"*) +# src="app" +# ;; +# *) +# src="" +# ;; +#esac +#There should be only one asset in the zipball directory +src="app" # If $src is not empty, let's process the asset if [ ! -z "$src" ]; then From d6bc23e67ae4e0e10df8c5e5b760b8d8a25c21e2 Mon Sep 17 00:00:00 2001 From: Krakinou Date: Sat, 17 Dec 2022 14:21:12 +0100 Subject: [PATCH 3/6] handle app.src update --- .github/workflows/updater.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index 633b91b..5a74ea3 100755 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -61,9 +61,9 @@ echo "Handling asset at $asset_url" # src="" # ;; #esac -#There should be only one asset in the zipball directory +#There should be only one asset in the zipball directory and it is a zip file src="app" - +extension="zip" # If $src is not empty, let's process the asset if [ ! -z "$src" ]; then @@ -79,20 +79,20 @@ checksum=$(sha256sum "$tempdir/$filename" | head -c 64) rm -rf $tempdir # Get extension -if [[ $filename == *.tar.gz ]]; then - extension=tar.gz -else - extension=${filename##*.} -fi +#if [[ $filename == *.tar.gz ]]; then +# extension=tar.gz +#else +# extension=${filename##*.} +#fi # Rewrite source file cat < conf/$src.src -SOURCE_URL=$asset_url +SOURCE_URL=$asset_url.$extension SOURCE_SUM=$checksum SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=$extension SOURCE_IN_SUBDIR=true -SOURCE_FILENAME= +SOURCE_EXTRACT=true EOT echo "... conf/$src.src updated" From 598aed6b215c00c1669fac5852b5be5ff434257a Mon Sep 17 00:00:00 2001 From: Krakinou Date: Sat, 17 Dec 2022 18:11:42 +0100 Subject: [PATCH 4/6] remove zip extension --- .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 5a74ea3..9bf8d2e 100755 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -87,7 +87,7 @@ rm -rf $tempdir # Rewrite source file cat < conf/$src.src -SOURCE_URL=$asset_url.$extension +SOURCE_URL=$asset_url SOURCE_SUM=$checksum SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=$extension From 2ea6464de4d8e89871fd11653132b76f0a8df70f Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 17 Dec 2022 17:12:48 +0000 Subject: [PATCH 5/6] Upgrade to v8.6.1 --- conf/app.src | 4 ++-- manifest.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/conf/app.src b/conf/app.src index c4d0ada..bc0162d 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/zwave-js/zwave-js-ui/archive/refs/tags/v8.6.0.zip -SOURCE_SUM=74b49ade42e2c98c82e63eb06d25a8979633ef14b5df04ca6b31e8ab618d48a2 +SOURCE_URL=https://api.github.com/repos/zwave-js/zwave-js-ui/zipball/v8.6.1 +SOURCE_SUM=0b0c70f076a66df3fcc5f7ea90b05530627914e87b0df5d1bcc430acb512607b SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 23151f6..2f65716 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Full featured Z-Wave Control Panel and MQTT Gateway integrated with domoticz", "fr": "Panneau de controle Z-Wave et MQTT intégré avec Domoticz" }, - "version": "8.6.0~ynh1", + "version": "8.6.1~ynh1", "url": "https://github.com/zwave-js/zwave-js-ui", "upstream": { "license": "MIT", @@ -45,7 +45,7 @@ "default": false, "help": { "en": "If set public, anyone can access the app without login in yunohost, you activate password protected login from within the app", - "fr": "Si publique, N'importe qui peut accéder à l'application sans se connecter à yunohost, vous pouvez cependant activer une connection par mot de passe depuis l'application" + "fr": "Si publique, N'importe qui peut accéder à l'application sans se connecter à yunohost, vous pouvez cependant activer une connection par mot de passe depuis l'application" } } ] From 09f9dabe1023a64dcaab7f6754b9b723dae5a008 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 17 Dec 2022 17:12:52 +0000 Subject: [PATCH 6/6] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 476786f..6bfa2e9 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ You may also install both app separatly. This app may also be usable with [Home-Assistant package](https://github.com/YunoHost-Apps/homeassistant_ynh) but I never tested it. -**Shipped version:** 8.6.0~ynh1 +**Shipped version:** 8.6.1~ynh1 ## Disclaimers / important information diff --git a/README_fr.md b/README_fr.md index 34b32cf..293bae2 100644 --- a/README_fr.md +++ b/README_fr.md @@ -27,7 +27,7 @@ Vous pouvez également installer les deux applications séparément. Cette application fonctionne également peut-être avec [le paquet Home-Assistant](https://github.com/YunoHost-Apps/homeassistant_ynh) mais je ne l'ai jamais testée. -**Version incluse :** 8.6.0~ynh1 +**Version incluse :** 8.6.1~ynh1 ## Avertissements / informations importantes