]> git.cworth.org Git - turbot/commitdiff
Makefile: Fix DO_NOT_DEPLOY implementation to work with multiple files
authorCarl Worth <cworth@cworth.org>
Tue, 29 Sep 2020 22:02:57 +0000 (15:02 -0700)
committerCarl Worth <cworth@cworth.org>
Tue, 29 Sep 2020 22:02:57 +0000 (15:02 -0700)
The --exclude option to rsync expects a single file, so we need to
arrange to pass it multiple times if we have multiple files in the
value of the DO_NOT_DEPLOY variable. Fortunately, this is a perfect
job for patsubst.

Makefile

index d0719d8cdb82fdf9ef6ace038f5a4fca019a4b45..3d10512283eb46149ba412ab221df9e64be28bce 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -64,7 +64,7 @@ deploy:
        make -C .deploy-source turbot.wsgi
        (cd .deploy-source; rsync -avz \
                $(DO_NOT_DEPLOY:%=--exclude=%) \
-               --exclude=$(DO_NOT_DELETE) \
+               $(patsubst %,--exclude %,$(DO_NOT_DELETE)) \
                --delete \
                --delete-after \
                ./ $(DEPLOY_HOST):$(DEPLOY_DIR) )