AspireSync/bin/update-sync
Chuck Adams f9b671a879
new script-based update strategy (#44)
* feat: dead simple and dead slow svn checkout scripts for plugins/themes

* feat: add scripts to check for updated plugins/themes

* tweak: split slugs on commas or whitespace instead of just commas

* tweak: replace --plugins and --themes options with --slugs and --slugs-from

* tweak: add logging config to Caddyfile

* feat: push-sync and update-sync commands

* build: bump composer versions
2025-01-28 08:27:53 -07:00

25 lines
805 B
Bash
Executable file

#!/bin/bash
. $(dirname $0)/prelude.bash
TMPDIR=${TMPDIR:-/tmp}
LOOKBACK_INTERVAL=${LOOKBACK_INTERVAL:--2 days}
RECHECK_INTERVAL=${RECHECK_INTERVAL:--4 hours}
function main () {
plugins=$(mktemp $TMPDIR/plugins.list.XXXXXXXX)
themes=$(mktemp $TMPDIR/themes.list.XXXXXXXX)
trap "rm -f $plugins $themes" EXIT
# Doesn't really belong here, but it's cheap enough to run
bin/console doctrine:migrations:migrate --quiet --no-interaction
svn/bin/ls-updated-plugins "$LOOKBACK_INTERVAL" | sort > $plugins
svn/bin/ls-updated-themes "$LOOKBACK_INTERVAL" | sort > $themes
bin/console sync:meta:fetch:plugins -vvv --slugs-from=$plugins --skip-checked-after="$RECHECK_INTERVAL"
bin/console sync:meta:fetch:themes -vvv --slugs-from=$themes --skip-checked-after="$RECHECK_INTERVAL"
}
main "$@"