ui: Makefile for test-paris & test-nantes
This commit is contained in:
59
Makefile
59
Makefile
@ -23,19 +23,26 @@ $(DIST_DIR)/index.html: src/index.pug src/config.json $(wildcard src/*.pug src/*
|
||||
@export ENV="dev"; \
|
||||
node_modules/.bin/pug --pretty $< --out $(dir $@) -O src/config.json || touch $@
|
||||
|
||||
# pug (prod)
|
||||
$(DIST_DIR)/index.prod.html: src/index.pug src/config.json $(wildcard src/*.pug src/*/*.pug)
|
||||
# pug (alpha)
|
||||
$(DIST_DIR)/index.alpha.html: src/index.pug src/config.json $(wildcard src/*.pug src/*/*.pug)
|
||||
@echo pug: $< ➜ $@
|
||||
|
||||
@export ENV="prod"; \
|
||||
node_modules/.bin/pug --pretty $< --out $(dir $@) -E prod.html -O src/config.json || touch $@
|
||||
@export ENV="alpha"; \
|
||||
node_modules/.bin/pug --pretty $< --out $(dir $@) -E alpha.html -O src/config.json || touch $@
|
||||
|
||||
# pug (staging)
|
||||
$(DIST_DIR)/index.staging.html: src/index.pug src/config.json $(wildcard src/*.pug src/*/*.pug)
|
||||
# pug (paris)
|
||||
$(DIST_DIR)/index.paris.html: src/index.pug src/config.json $(wildcard src/*.pug src/*/*.pug)
|
||||
@echo pug: $< ➜ $@
|
||||
|
||||
@export ENV="staging"; \
|
||||
node_modules/.bin/pug --pretty $< --out $(dir $@) -E staging.html -O src/config.json || touch $@
|
||||
@export ENV="paris"; \
|
||||
node_modules/.bin/pug --pretty $< --out $(dir $@) -E paris.html -O src/config.json || touch $@
|
||||
|
||||
# pug (nantes)
|
||||
$(DIST_DIR)/index.nantes.html: src/index.pug src/config.json $(wildcard src/*.pug src/*/*.pug)
|
||||
@echo pug: $< ➜ $@
|
||||
|
||||
@export ENV="nantes"; \
|
||||
node_modules/.bin/pug --pretty $< --out $(dir $@) -E nantes.html -O src/config.json || touch $@
|
||||
|
||||
# sass
|
||||
$(DIST_DIR)/styles/index.css: src/styles/_index.scss $(wildcard src/*.scss src/*/*.scss src/*/*/*.scss src/*/*/*/*.scss)
|
||||
@ -48,20 +55,32 @@ $(DIST_DIR)/%.js: src/%.js .babelrc
|
||||
@mkdir -p $(dir $@)
|
||||
@node_modules/.bin/babel $< --out-file $@ --source-maps || touch $@
|
||||
|
||||
buildstaging: build
|
||||
$(MAKE) $(DIST_DIR)/index.staging.html
|
||||
buildparis: build
|
||||
$(MAKE) $(DIST_DIR)/index.paris.html
|
||||
|
||||
buildprod: build
|
||||
$(MAKE) $(DIST_DIR)/index.prod.html
|
||||
syncparis: buildparis
|
||||
rsync -rv --exclude '*.html' www/* test-paris@ssh-test-paris.happy-dev.fr:~/www/
|
||||
rsync --no-R --no-implied-dirs www/index.paris.html test-paris@ssh-test-paris.happy-dev.fr:~/www/index.html
|
||||
rsync -v www/.htaccess test-paris@ssh-test-paris.happy-dev.fr:~/www/
|
||||
|
||||
sync: buildstaging
|
||||
rsync -rv www/* staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/ --exclude=www/index.html --exclude=www/index.prod.html --exclude=www/index.staging.html
|
||||
rsync --no-R --no-implied-dirs www/index.staging.html staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/index.html
|
||||
rsync -v www/.htaccess staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/
|
||||
buildnantes: build
|
||||
$(MAKE) $(DIST_DIR)/index.nantes.html
|
||||
|
||||
syncprod: buildprod
|
||||
rsync -rv www/* alpha@ssh-alpha.happy-dev.fr:~/www/ --exclude=www/index.html --exclude=www/index.prod.html --exclude=www/index.staging.html
|
||||
rsync --no-R --no-implied-dirs www/index.prod.html alpha@ssh-alpha.happy-dev.fr:~/www/index.html
|
||||
syncnantes: buildnantes
|
||||
rsync -rv --exclude '*.html' www/* test-nantes@ssh-test-nantes.happy-dev.fr:~/www/
|
||||
rsync --no-R --no-implied-dirs www/index.nantes.html test-nantes@ssh-test-nantes.happy-dev.fr:~/www/index.html
|
||||
rsync -v www/.htaccess test-nantes@ssh-test-nantes.happy-dev.fr:~/www/
|
||||
|
||||
buildalpha: build
|
||||
$(MAKE) $(DIST_DIR)/index.alpha.html
|
||||
|
||||
syncalpha: buildalpha
|
||||
rsync -rv --exclude '*.html' www/* alpha@ssh-alpha.happy-dev.fr:~/www/
|
||||
rsync --no-R --no-implied-dirs www/index.alpha.html alpha@ssh-alpha.happy-dev.fr:~/www/index.html
|
||||
rsync -v www/.htaccess alpha@ssh-alpha.happy-dev.fr:~/www/
|
||||
|
||||
.PHONY: default build watch sync syncprod buildstaging buildprod
|
||||
sync: syncnantes syncparis
|
||||
|
||||
syncprod: syncalpha
|
||||
|
||||
.PHONY: default build watch sync syncprod
|
||||
Reference in New Issue
Block a user