|
|
|
@ -1,6 +1,15 @@
|
|
|
|
DESTDIR=/srv/www/yavscpre
|
|
|
|
DESTDIR=/srv/www/yavscpre
|
|
|
|
PRODDESTDIR=/srv/www/yavsc
|
|
|
|
PRODDESTDIR=/srv/www/yavsc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
git_status := $(shell git status -s --porcelain |wc -l)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
status:
|
|
|
|
|
|
|
|
ifeq ($(git_status),0)
|
|
|
|
|
|
|
|
@echo Nothing to be done.
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
@git status
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
default: pushInPre
|
|
|
|
default: pushInPre
|
|
|
|
|
|
|
|
|
|
|
|
watch:
|
|
|
|
watch:
|
|
|
|
@ -27,16 +36,13 @@ pushInPre: bin/output/wwwroot/version
|
|
|
|
ssh root@localhost systemctl start kestrel-pre
|
|
|
|
ssh root@localhost systemctl start kestrel-pre
|
|
|
|
|
|
|
|
|
|
|
|
pushInProd: bin/output/wwwroot/version
|
|
|
|
pushInProd: bin/output/wwwroot/version
|
|
|
|
|
|
|
|
ifeq ($(git_status),0)
|
|
|
|
ssh root@localhost systemctl stop kestrel
|
|
|
|
ssh root@localhost systemctl stop kestrel
|
|
|
|
ssh root@localhost rm -rf $(PRODDESTDIR)/approot
|
|
|
|
ssh root@localhost rm -rf $(PRODDESTDIR)/approot
|
|
|
|
(cd bin/output && rsync -ravu ./ root@localhost:$(PRODDESTDIR) >/dev/null)
|
|
|
|
(cd bin/output && rsync -ravu ./ root@localhost:$(PRODDESTDIR) >/dev/null)
|
|
|
|
ssh root@localhost sync
|
|
|
|
ssh root@localhost sync
|
|
|
|
ssh root@localhost systemctl start kestrel
|
|
|
|
ssh root@localhost systemctl start kestrel
|
|
|
|
|
|
|
|
|
|
|
|
status:
|
|
|
|
|
|
|
|
ifeq ($(git status -s --porcelain |wc -l),0)
|
|
|
|
|
|
|
|
@echo oui
|
|
|
|
|
|
|
|
else
|
|
|
|
else
|
|
|
|
@echo non
|
|
|
|
@echo Err! Refus de pousser en production: des changements doivent être validés auprès du contrôle de versions.
|
|
|
|
|
|
|
|
@git status
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|