From bc48d7428607c84003658d5b88d41cf923d010fd Mon Sep 17 00:00:00 2001 From: Joris Date: Sat, 18 Jan 2020 16:18:26 +0100 Subject: Add deploy command --- Makefile | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 5c615b3..5097b56 100644 --- a/Makefile +++ b/Makefile @@ -4,11 +4,6 @@ start: stop: @tmux kill-session -t sharedCost -dist: - @nix-build -o result-server -A ghc.server - @nix-build -o result-client -A ghcjs.client - @nix-shell -p closurecompiler --command 'closure-compiler result-client/bin/client.jsexe/all.js --js_output_file public/javascript/main.js' - clean: clean-server clean-client build: build-server build-client cp-client @@ -49,3 +44,19 @@ run-server: watch-server: @nix-shell -A shells.ghc --run "nodemon --delay 0.2 --watch ./server --watch ./common --ext hs --exec '(tput reset && make build-server-inside && make run-server) || :'" + +# Deploy +# ------ + +deploy: + @make clean + @nix-build -o result-server -A ghc.server + @nix-build -o result-client -A ghcjs.client + @nix-shell -p closurecompiler --command 'closure-compiler result-client/bin/client.jsexe/all.js --js_output_file public/javascript/main.js' + @rm -rf bundle + @mkdir bundle + @cp application.conf bundle + @cp -r public bundle + @cp result-server/bin/server bundle + @rsync -avzhr bundle/ guyonvarch.me:servers/shared-cost + @rm -rf bundle -- cgit v1.2.3