]> git.cworth.org Git - lmno.games/commitdiff
make deploy: Go back to deleting any pre-existing files on the server
authorCarl Worth <cworth@cworth.org>
Sun, 17 May 2020 16:13:37 +0000 (09:13 -0700)
committerCarl Worth <cworth@cworth.org>
Sun, 17 May 2020 16:13:37 +0000 (09:13 -0700)
We stopped doing this back in commit
0bce98367c70c43eaa425aad101e15ed3db612a8 specifically because I was
concerned about a deployment of the top-level "lmno.games" content
obliterating lower-level content (such as that deployed by the
"empires-html" repository).

But now, I've switched to hosting the empires HTML content in this
same repository where it will be deployed together. And that's my plan
going forward, to house all static HTML content here in this
lmno.games repository. So in this commit we start passing the --delete
flag to rsync again.

The one exception is the "flempires" directory where Kevin is
currently experimenting. In the future, we'll likely incorporate that
content into this repository as well. But for now, we simply
explicitly exclude it so that deployments here won't destroy anything
he has deployed there.

0bce98367c70c43eaa425aad101e15ed3db612a8#

Makefile

index fb39f7f4d518c0a1551a7e2a8445d809c84ba0e2..cac62148ceba6fd43870edfb4a65b43ddccf2e89 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
 DEPLOY_HOST=lmno.games
 DEPLOY_DIR=/srv/lmno.games/www
 DO_NOT_DEPLOY="Makefile"
 DEPLOY_HOST=lmno.games
 DEPLOY_DIR=/srv/lmno.games/www
 DO_NOT_DEPLOY="Makefile"
+DO_NOT_DELETE=flempires
 
 deploy:
        rm -rf .deploy-source
 
 deploy:
        rm -rf .deploy-source
@@ -8,5 +9,8 @@ deploy:
        rm -rf .deploy-source/.git
        (cd .deploy-source; rsync -avz \
                --exclude=$(DO_NOT_DEPLOY) \
        rm -rf .deploy-source/.git
        (cd .deploy-source; rsync -avz \
                --exclude=$(DO_NOT_DEPLOY) \
+               --exclude=$(DO_NOT_DELETE) \
+               --delete \
+               --delete-after \
                ./ $(DEPLOY_HOST):$(DEPLOY_DIR) )
        rm -rf .deploy-source
                ./ $(DEPLOY_HOST):$(DEPLOY_DIR) )
        rm -rf .deploy-source