mirror of
https://github.com/YunoHost-Apps/nodered_ynh.git
synced 2024-09-03 19:46:25 +02:00
Fix auto-updater script
This commit is contained in:
parent
f08329e5ad
commit
52eee0a7fa
1 changed files with 4 additions and 7 deletions
11
.github/workflows/updater.sh
vendored
11
.github/workflows/updater.sh
vendored
|
@ -71,8 +71,8 @@ if [ ! -z "$src" ]; then
|
||||||
tempdir="$(mktemp -d)"
|
tempdir="$(mktemp -d)"
|
||||||
|
|
||||||
# Download sources and calculate checksum
|
# Download sources and calculate checksum
|
||||||
filename=${DOWNLOAD_URL##*/}
|
filename=${asset_url##*/}
|
||||||
curl --silent -4 -L $DOWNLOAD_URL -o "$tempdir/$filename"
|
curl --silent -4 -L $asset_url -o "$tempdir/$filename"
|
||||||
checksum=$(sha256sum "$tempdir/$filename" | head -c 64)
|
checksum=$(sha256sum "$tempdir/$filename" | head -c 64)
|
||||||
|
|
||||||
# Delete temporary directory
|
# Delete temporary directory
|
||||||
|
@ -87,7 +87,7 @@ fi
|
||||||
|
|
||||||
# Rewrite source file
|
# Rewrite source file
|
||||||
cat <<EOT > conf/$src.src
|
cat <<EOT > conf/$src.src
|
||||||
SOURCE_URL=$DOWNLOAD_URL
|
SOURCE_URL=$asset_url
|
||||||
SOURCE_SUM=$checksum
|
SOURCE_SUM=$checksum
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=$extension
|
SOURCE_FORMAT=$extension
|
||||||
|
@ -113,11 +113,8 @@ done
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Install moreutils, needed for sponge
|
|
||||||
sudo apt-get install moreutils
|
|
||||||
|
|
||||||
# Replace new version in manifest
|
# Replace new version in manifest
|
||||||
jq -s --indent 4 ".[] | .version = \"$VERSION~ynh1\"" manifest.json | sponge manifest.json
|
echo "$(jq -s --indent 4 ".[] | .version = \"$version~ynh1\"" manifest.json)" > manifest.json
|
||||||
|
|
||||||
# No need to update the README, yunohost-bot takes care of it
|
# No need to update the README, yunohost-bot takes care of it
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue