EBernhardson has submitted this change and it was merged.

Change subject: Auto-provision from 'make update' on change
......................................................................


Auto-provision from 'make update' on change

Change-Id: I1e576c995fc628ac1277cdb7007a7064910de89a
---
M Makefile
1 file changed, 6 insertions(+), 2 deletions(-)

Approvals:
  EBernhardson: Verified; Looks good to me, approved



diff --git a/Makefile b/Makefile
index dfb5cc9..fab08c4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,6 @@
-HASH := $(shell git log -1 --pretty=oneline | cut -d ' ' -f 1)
+GIT_HASH := $(shell git log -1 --pretty=oneline | cut -d ' ' -f 1)
 SUBMODULES := $(shell find shiny-server/ -mindepth 1 -maxdepth 1 -type d)
+SETUP_HASH := $(shell md5sum setup.sh | cut -d ' ' -f 1)
 
 bump_metrics_submodule:
        for i in $(SUBMODULES); do cd $$i; git pull --ff-only; cd -;done
@@ -9,7 +10,10 @@
 update:
        git pull --ff-only
        git submodule update --init --recursive
-ifneq ($(HASH),$(shell git log -1 --pretty=oneline | cut -d ' ' -f 1))
+ifneq ($(SETUP_HASH),$(shell md5sum setup.sh | cut -d ' ' -f 1))
+       sudo bash -e ./setup.sh
+endif
+ifneq ($(GIT_HASH),$(shell git log -1 --pretty=oneline | cut -d ' ' -f 1))
        sudo service shiny-server restart
 endif
 

-- 
To view, visit https://gerrit.wikimedia.org/r/235151
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1e576c995fc628ac1277cdb7007a7064910de89a
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/discovery/dashboard
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to