DIB
This commit is contained in:
parent
16a9c79b46
commit
8ae3072728
1 changed files with 12 additions and 3 deletions
|
|
@ -2,6 +2,9 @@ DESTDIR=/srv/www/yavscpre
|
||||||
PRODDESTDIR=/srv/www/yavsc
|
PRODDESTDIR=/srv/www/yavsc
|
||||||
ASPNET_ENV=Development
|
ASPNET_ENV=Development
|
||||||
|
|
||||||
|
all: project.lock.json
|
||||||
|
dnu build
|
||||||
|
|
||||||
git_status := $(shell git status -s --porcelain |wc -l)
|
git_status := $(shell git status -s --porcelain |wc -l)
|
||||||
|
|
||||||
status:
|
status:
|
||||||
|
|
@ -13,13 +16,19 @@ endif
|
||||||
|
|
||||||
default: pushInPre
|
default: pushInPre
|
||||||
|
|
||||||
watch:
|
project.lock.json: project.json
|
||||||
|
dnu restore
|
||||||
|
|
||||||
|
watch: project.lock.json
|
||||||
@ASPNET_ENV=$(ASPNET_ENV) dnx-watch web --configuration=Debug
|
@ASPNET_ENV=$(ASPNET_ENV) dnx-watch web --configuration=Debug
|
||||||
|
|
||||||
run:
|
run:
|
||||||
@ASPNET_ENV=$(ASPNET_ENV) dnx web --configuration=Debug
|
@ASPNET_ENV=$(ASPNET_ENV) dnx web --configuration=Debug
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
rm -rf bin obj
|
||||||
|
|
||||||
|
cleanoutput:
|
||||||
@rm -rf bin/Release
|
@rm -rf bin/Release
|
||||||
@rm -rf bin/output
|
@rm -rf bin/output
|
||||||
|
|
||||||
|
|
@ -32,14 +41,14 @@ bin/output: bin/Release
|
||||||
bin/output/wwwroot/version: bin/output
|
bin/output/wwwroot/version: bin/output
|
||||||
@git log -1 --pretty=format:%h > bin/output/wwwroot/version
|
@git log -1 --pretty=format:%h > bin/output/wwwroot/version
|
||||||
|
|
||||||
pushInPre: bin/output/wwwroot/version
|
pushInPre: cleanoutput bin/output/wwwroot/version
|
||||||
ssh root@localhost systemctl stop kestrel-pre
|
ssh root@localhost systemctl stop kestrel-pre
|
||||||
ssh root@localhost rm -rf $(DESTDIR)/approot
|
ssh root@localhost rm -rf $(DESTDIR)/approot
|
||||||
(cd bin/output && rsync -ravu ./ root@localhost:$(DESTDIR) >/dev/null)
|
(cd bin/output && rsync -ravu ./ root@localhost:$(DESTDIR) >/dev/null)
|
||||||
ssh root@localhost sync
|
ssh root@localhost sync
|
||||||
ssh root@localhost systemctl start kestrel-pre
|
ssh root@localhost systemctl start kestrel-pre
|
||||||
|
|
||||||
pushInProd: bin/output/wwwroot/version
|
pushInProd: cleanoutput bin/output/wwwroot/version
|
||||||
ifeq ($(git_status),0)
|
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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue