fix: staging & prod makefile

This commit is contained in:
Jean-Baptiste Pasquier 2019-04-23 10:42:53 +02:00
parent 184940b15e
commit a6f2c0d4a2
No known key found for this signature in database
GPG Key ID: F2702E6D22ED4D62

View File

@ -7,13 +7,9 @@ SCRIPT_DEST := $(SCRIPT_SRC:src/%=$(DIST_DIR)/%)
default: build
clean:
git clean -fXd -e !src/config.pug
git clean -fXd -e !src/config.json
install: node_modules copy_lib copy_samples submodules
submodules:
git submodule init
git submodule update --recursive --remote
install: node_modules copy_lib copy_samples
build: $(DIST_DIR)/index.html $(DIST_DIR)/styles/index.css $(SCRIPT_DEST)
@ -74,6 +70,9 @@ $(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
buildprod: build
$(MAKE) $(DIST_DIR)/index.prod.html
@ -87,9 +86,9 @@ sync: buildstaging
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/
sync-prod: buildprod
rsync -rv www/* alpha@ssh-alpha.happy-dev.fr:~/alpha.happy-dev.fr/ --exclude=www/index.html --exclude=www/index.prod.html --exclude=www/index.staging.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
rsync -v www/.htaccess alpha@ssh-alpha.happy-dev.fr:~/www/
.PHONY: default install submodules copy_lib copy_samples build watch serve clean sync buildprod pull deploy
.PHONY: default install copy_lib copy_samples build watch serve clean sync syncprod buildstaging buildprod pull deploy