Skip to content
Snippets Groups Projects
Verified Commit a6f2c0d4 authored by Jean-Baptiste Pasquier's avatar Jean-Baptiste Pasquier
Browse files

fix: staging & prod makefile

parent 184940b1
No related branches found
No related tags found
No related merge requests found
...@@ -7,13 +7,9 @@ SCRIPT_DEST := $(SCRIPT_SRC:src/%=$(DIST_DIR)/%) ...@@ -7,13 +7,9 @@ SCRIPT_DEST := $(SCRIPT_SRC:src/%=$(DIST_DIR)/%)
default: build default: build
clean: clean:
git clean -fXd -e !src/config.pug git clean -fXd -e !src/config.json
install: node_modules copy_lib copy_samples submodules install: node_modules copy_lib copy_samples
submodules:
git submodule init
git submodule update --recursive --remote
build: $(DIST_DIR)/index.html $(DIST_DIR)/styles/index.css $(SCRIPT_DEST) build: $(DIST_DIR)/index.html $(DIST_DIR)/styles/index.css $(SCRIPT_DEST)
...@@ -74,6 +70,9 @@ $(DIST_DIR)/%.js: src/%.js .babelrc ...@@ -74,6 +70,9 @@ $(DIST_DIR)/%.js: src/%.js .babelrc
@mkdir -p $(dir $@) @mkdir -p $(dir $@)
@node_modules/.bin/babel $< --out-file $@ --source-maps || touch $@ @node_modules/.bin/babel $< --out-file $@ --source-maps || touch $@
buildstaging: build
$(MAKE) $(DIST_DIR)/index.staging.html
buildprod: build buildprod: build
$(MAKE) $(DIST_DIR)/index.prod.html $(MAKE) $(DIST_DIR)/index.prod.html
...@@ -87,9 +86,9 @@ sync: buildstaging ...@@ -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 --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/ rsync -v www/.htaccess staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/
sync-prod: buildprod syncprod: 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 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 --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/ 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
\ No newline at end of file \ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment