From cef283040d7f48260c11884d47798b0a7c0dde16 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Fri, 15 Jul 2022 14:23:02 +0530 Subject: [PATCH] Update updater.sh --- .github/workflows/updater.sh | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index 32dce5e..61c5a7a 100755 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -45,44 +45,15 @@ elif git ls-remote -q --exit-code --heads https://github.com/$GITHUB_REPOSITORY. exit 0 fi -# Each release can hold multiple assets (e.g. binaries for different architectures, source code, etc.) -echo "${#assets[@]} available asset(s)" - #================================================= # UPDATE SOURCE FILES #================================================= -# Here we use the $assets variable to get the resources published in the upstream release. -# Here is an example for Grav, it has to be adapted in accordance with how the upstream releases look like. - -# Let's loop over the array of assets URLs -for asset_url in ${assets[@]}; do - -echo "Handling asset at $asset_url" - -# Assign the asset to a source file in conf/ directory -# Here we base the source file name upon a unique keyword in the assets url (admin vs. update) -# Leave $src empty to ignore the asset -case $asset_url in - *"admin"*) - src="app" - ;; - *"update"*) - src="app-upgrade" - ;; - *) - src="" - ;; -esac - -# If $src is not empty, let's process the asset -if [ ! -z "$src" ]; then - # Create the temporary directory tempdir="$(mktemp -d)" # Download sources and calculate checksum -filename=${asset_url##*/} +filename="https://github.com/advplyr/audiobookshelf/archive/refs/tags/v$version.tar.gz" curl --silent -4 -L $asset_url -o "$tempdir/$filename" checksum=$(sha256sum "$tempdir/$filename" | head -c 64)