Merge branch 'make-commands' into 'master'
Correct sync location and split up steps See merge request agaric/sites/agaric-com!56
This commit is contained in:
commit
e0ece9432a
1 changed files with 8 additions and 4 deletions
12
Makefile
12
Makefile
|
@ -1,5 +1,5 @@
|
|||
# Identify tasks which do not have output files:
|
||||
.PHONY: help synclivetotest
|
||||
.PHONY: help synclivetotest syncdb syncfiles
|
||||
|
||||
GREEN := $(shell tput -Txterm setaf 2)
|
||||
WHITE := $(shell tput -Txterm setaf 7)
|
||||
|
@ -29,13 +29,17 @@ help: ##@Targets Show this text (or just run make)
|
|||
# Configure sync'
|
||||
ALIAS_LIVE := @live.live
|
||||
ALIAS_TEST := @test.dev
|
||||
SRV := elizabeth.mayfirst.org
|
||||
FILES_LIVE := /home/agaric_live/files
|
||||
SRV := root@elizabeth.mayfirst.org
|
||||
FILES_LIVE := /home/agaric_live/files/
|
||||
FILES_TEST := /home/agaric_test/files
|
||||
ECHO := $(if $(TEST),@echo)
|
||||
synclivetotest: ##@Targets Sync live environment to test
|
||||
synclivetotest: syncfiles syncdb ##@Targets Sync live environment to test
|
||||
|
||||
syncdb:
|
||||
$(ECHO) drush -y $(ALIAS_TEST) sql-drop
|
||||
$(ECHO) drush -y sql-sync $(ALIAS_LIVE) $(ALIAS_TEST)
|
||||
|
||||
syncfiles:
|
||||
$(ECHO) ssh -A $(SRV) rsync -rz --stats --exclude styles \
|
||||
--exclude css --exclude js $(FILES_LIVE) \
|
||||
--delete ${FILES_TEST}
|
||||
|
|
Loading…
Reference in a new issue