From c52f1a493e3c8d9fed68f5497f1c84ef6bb66291 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20W=C3=BChr?= Date: Mon, 4 Sep 2023 18:58:55 +0200 Subject: [PATCH] Switch to manifest src handling - take 1 --- conf/amd64.src | 6 ------ conf/arm64.src | 6 ------ conf/armhf.src | 6 ------ manifest.toml | 17 +++++++++++++++++ tools/update_src.sh | 20 -------------------- 5 files changed, 17 insertions(+), 38 deletions(-) delete mode 100644 conf/amd64.src delete mode 100644 conf/arm64.src delete mode 100644 conf/armhf.src delete mode 100644 tools/update_src.sh diff --git a/conf/amd64.src b/conf/amd64.src deleted file mode 100644 index 9a815e5..0000000 --- a/conf/amd64.src +++ /dev/null @@ -1,6 +0,0 @@ -SOURCE_URL=https://github.com/binwiederhier/ntfy/releases/download/v2.7.0/ntfy_2.7.0_linux_amd64.tar.gz -SOURCE_SUM=2218bea3204348700034cff652437e317b8ed2466aa58d8b2444b41b68eaf5e2 -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=true -SOURCE_FILENAME=ntfy_2.7.0_linux_amd64 diff --git a/conf/arm64.src b/conf/arm64.src deleted file mode 100644 index ea734ee..0000000 --- a/conf/arm64.src +++ /dev/null @@ -1,6 +0,0 @@ -SOURCE_URL=https://github.com/binwiederhier/ntfy/releases/download/v2.7.0/ntfy_2.7.0_linux_arm64.tar.gz -SOURCE_SUM=1e0e1bc4183e3ffecbe8d8b1b91b5df8965d907968588c19b7a591719bd146fb -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=true -SOURCE_FILENAME=ntfy_2.7.0_linux_arm64 diff --git a/conf/armhf.src b/conf/armhf.src deleted file mode 100644 index 385e297..0000000 --- a/conf/armhf.src +++ /dev/null @@ -1,6 +0,0 @@ -SOURCE_URL=https://github.com/binwiederhier/ntfy/releases/download/v2.7.0/ntfy_2.7.0_linux_armv7.tar.gz -SOURCE_SUM=84981fe6f4234fb8e6429b0c6cbe7090bab1f773e1994b42237c40c244cdd326 -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=true -SOURCE_FILENAME=ntfy_2.7.0_linux_armv7 diff --git a/manifest.toml b/manifest.toml index 83125fb..726a954 100644 --- a/manifest.toml +++ b/manifest.toml @@ -43,6 +43,23 @@ ram.runtime = "50M" type = "password" [resources] + [resources.sources] + [resources.sources.main] + autoupdate.strategy = "latest_github_release" + + autoupdate.asset.amd64 = ".*_linux_amd64\.tar\.gz" + autoupdate.asset.arm64 = ".*_linux_arm64\.tar\.gz" + autoupdate.asset.armhf = ".*_linux_armv7\.tar\.gz" + + amd64.url = "https://github.com/binwiederhier/ntfy/releases/download/v2.7.0/ntfy_2.7.0_linux_amd64.tar.gz" + amd64.sha256 = "2218bea3204348700034cff652437e317b8ed2466aa58d8b2444b41b68eaf5e2" + + arm64.url = "https://github.com/binwiederhier/ntfy/releases/download/v2.7.0/ntfy_2.7.0_linux_arm64.tar.gz" + arm64.sha256 = "1e0e1bc4183e3ffecbe8d8b1b91b5df8965d907968588c19b7a591719bd146fb" + + armhf.url = "https://github.com/binwiederhier/ntfy/releases/download/v2.7.0/ntfy_2.7.0_linux_armv7.tar.gz" + armhf.sha256 ="84981fe6f4234fb8e6429b0c6cbe7090bab1f773e1994b42237c40c244cdd326" + [resources.system_user] [resources.install_dir] diff --git a/tools/update_src.sh b/tools/update_src.sh deleted file mode 100644 index f123c9a..0000000 --- a/tools/update_src.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -VERSION=$1 - -CHECKSUMS=`wget https://github.com/binwiederhier/ntfy/releases/download/v$VERSION/checksums.txt -q -O -` - -src() { - cat << SH > conf/$1.src -SOURCE_URL=https://github.com/binwiederhier/ntfy/releases/download/v${VERSION}/ntfy_${VERSION}_linux_${2}.tar.gz -SOURCE_SUM=`echo "$CHECKSUMS" | grep ${VERSION}_linux_${2}.tar.gz | cut -d " " -f 1` -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=true -SOURCE_FILENAME=ntfy_${VERSION}_linux_${2} -SH -} - -src amd64 amd64 -src arm64 arm64 -src armhf armv7