2020-01-17 20:19:12 +00:00
|
|
|
BUILDDIR?=../ungleich-staticcms-build
|
2020-05-06 04:06:17 +00:00
|
|
|
BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
|
|
|
|
|
|
|
|
ifeq ($(BRANCH), "master")
|
|
|
|
DESTINATION=ungleichstatic@staticweb.ungleich.ch:/home/services/www/ungleichstatic/staticcms.ungleich.ch/www/u/
|
|
|
|
else
|
|
|
|
DESTINATION=ungleichstatic@staticweb.ungleich.ch:/home/services/www/ungleichstatic/staticcms-staging.ungleich.ch/www/u/
|
|
|
|
endif
|
|
|
|
|
2019-09-24 12:13:26 +00:00
|
|
|
|
|
|
|
all: publish
|
|
|
|
|
2019-09-25 12:31:06 +00:00
|
|
|
pull:
|
|
|
|
git pull
|
|
|
|
|
2020-01-17 20:19:12 +00:00
|
|
|
publish: pull build deploy
|
|
|
|
|
|
|
|
deploy: permissions
|
2019-12-31 00:39:46 +00:00
|
|
|
rsync -av --delete --exclude .lektor/ $(BUILDDIR)/u/ $(DESTINATION)
|
2020-01-13 02:07:57 +00:00
|
|
|
rsync -av --delete $(BUILDDIR)/sitemap.xml $(DESTINATION)
|
2020-01-17 20:19:12 +00:00
|
|
|
|
2019-09-24 12:13:26 +00:00
|
|
|
permissions: build
|
|
|
|
find $(BUILDDIR) -type f -exec chmod 0644 {} \;
|
|
|
|
find $(BUILDDIR) -type d -exec chmod 0755 {} \;
|
|
|
|
|
|
|
|
build:
|
|
|
|
lektor build -O $(BUILDDIR)
|
2019-11-18 14:36:27 +00:00
|
|
|
|
|
|
|
clean:
|
2019-12-31 00:39:46 +00:00
|
|
|
rm -rf $(BUILDDIR)
|