Created
October 15, 2015 16:43
-
-
Save rtorr/2e2868e9223e71ac214c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dev: | |
NODE_ENV=dev $(BIN)/pm2 startOrRestart ./services/pm2_dev_config.json | |
foreman start -f ./services/Procfile_dev | |
test: | |
npm test | |
clean: | |
rm -rf node_modules | |
rm -rf dist | |
build: | |
npm install | |
NODE_ENV=production $(BIN)/webpack | |
NODE_ENV=production rsync -av --progress $(src_path)/* $(dist_path) --exclude __tests__ | |
NODE_ENV=production $(BIN)/babel -i $(src_path)/public $(src_path) --out-dir $(dist_path) | |
run_remote_server_install_and_run: | |
$(ssh) 'cd $(application_path)/$(package_name) && npm install --production' | |
$(ssh) 'cd $(application_path)/$(package_name) && NODE_ENV=production npm run prod' | |
deploy: | |
make clean | |
make build | |
make test | |
mkdir -p $(temp_directory) | |
tar --exclude='.git' --exclude='Makefile' --exclude='./src' --exclude='./node_modules' -zcvf $(temp_directory)/$(tarball_name) $(project_path)/* | |
$(ssh) 'rm -rf $(application_path)/$(tarball_name) $(application_path)/$(package_name)' | |
scp -rp $(temp_directory)/$(tarball_name) $(server_user)@$(server_name):$(application_path) | |
$(ssh) 'mkdir -p $(application_path)/$(package_name)' | |
$(ssh) 'tar -C $(application_path)/$(package_name) -xvf $(application_path)/$(tarball_name)' | |
make run_remote_server_install_and_run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment