This file contains 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
ARCHIVE_DIR=archive | |
ARCHIVE_NAME=archive.tgz | |
all: clean | |
tar -czvf ${ARCHIVE_NAME} --exclude ${ARCHIVE_NAME} -C ../ $${PWD##*/} | |
mkdir -p ${ARCHIVE_DIR} | |
mv ${ARCHIVE_NAME} ${ARCHIVE_DIR} | |
clean: | |
rm -rf ${ARCHIVE_DIR} | |
find . -name "*~" -delete |
If you put this in the root of your application and run "make", an archive of the entire application will be stored in archive/archive.tgz. Now you probably want to password protect this resource so add the following in your app.yaml file:
This file contains 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
- url: /archive | |
static_dir: archive | |
login: admin |
Now if you go to http://yourapp.appspot.com/archive/archive.tgz you'll be prompted to login to download the source archive.
Don't ask me how long it took me to figure out I needed to use two dollar signs on the fancy parameter substitution $${PWD##*/} because it is a shell variable and not a make variable -- really, don't ask.