searxng/diff.sh
ange b24dc7fbab
All checks were successful
/ deploy (push) Successful in 5s
chore: bump 2024.7.29-98c73010f (#1)
Reviewed-on: #1
2024-07-30 10:21:28 +00:00

20 lines
536 B
Bash
Executable File

#!/bin/bash -e
. ./.env
DOCKER_API='https://hub.docker.com/v2/namespaces/searxng/repositories/searxng'
REPO='https://github.com/searxng/searxng/raw'
tmp="$(mktemp)"
new_tag="$(curl -L "$DOCKER_API/tags" | jq -r '.results[2].name')"
new_commit="$(grep -Eo '\w+$' <<< "$new_tag")"
for f in limiter.toml settings.yml; do
if curl -Lo "$tmp" "$REPO/$new_commit/searx/$f" && ! diff -Z "$tmp" "config/$f" > /dev/null; then
$EDITOR -d -c "wincmd l" -- "config/$f" "$tmp"
fi
done
sed -i "/^IMAGEAPP=/s/:.*/:$new_tag/" .env