1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/searxng_ynh.git synced 2024-09-03 20:26:00 +02:00

Update updater

This commit is contained in:
Sylvain 2024-06-09 22:46:29 +02:00
parent 56157639ff
commit ca0cf5b7a0

View file

@ -17,7 +17,7 @@
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)
version_raw=$(curl --silent "https://api.github.com/repos/$repo/commits/master" | jq -r ".commit.author.date")
version_raw=$(curl --silent "https://api.github.com/repos/$repo/commits/master" | jq -r ".commit.committer.date")
version=$(date -d "$version_raw" +%Y.%m.%d.%H.%M.%S)
commit_hash=$(curl --silent "https://api.github.com/repos/$repo/commits/master" | jq -r ".sha")