From f8c0af484e60952ccbfd79ad3d176f4d875c1bf4 Mon Sep 17 00:00:00 2001 From: David Gomes <10091092+davidgomesdev@users.noreply.github.com> Date: Wed, 3 Jan 2024 21:33:53 +0000 Subject: [PATCH] ci: only launch plugins if outdated --- server/scripts/launch-all.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/scripts/launch-all.sh b/server/scripts/launch-all.sh index 8a444d1..71e77d1 100755 --- a/server/scripts/launch-all.sh +++ b/server/scripts/launch-all.sh @@ -34,7 +34,8 @@ printf "\n${SECTION}* Updating and launching plugins...$RESET\n\n" PLUGINS_PATH=${PLUGINS_PATH:-../RustyController-plugins} -mkdir -p /var/log/rusty-controller/plugins/ && cd "$PLUGINS_PATH" && git pull && bash run-all.sh +# Run plugins only if outdated +mkdir -p /var/log/rusty-controller/plugins/ && cd "$PLUGINS_PATH" && git remote update && git status -uno | grep -q 'Your branch is behind' && git pull && bash run-all.sh echo -e "\n${SUCCESS}* Finished! (at $(date))$RESET" echo