forked from ParisiLabs/node-pokemap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathZIP.bash
More file actions
executable file
·39 lines (28 loc) · 889 Bytes
/
ZIP.bash
File metadata and controls
executable file
·39 lines (28 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
set -e
set -u
ZIPFILE=pokemap-$(date +%Y-%m-%d).zip
rm -rf /tmp/pokemap-build/
mkdir -p /tmp/pokemap-build/{pokemap,test}
rsync -av --exclude=.git --exclude=test ./ /tmp/pokemap-build/pokemap/
pushd /tmp/pokemap-build/
pushd /tmp/pokemap-build/pokemap/
# remove this script
rm -f ZIP.bash
# remove private key
rm -f privkey.pem
# preserve demo.json, but remove other debug files
rsync -av utils/demo.json ./
rm -rf utils/
mkdir -p utils/
mv demo.json utils/
# remove ursa and rely only on node-forge
rm -rf node_modules/ursa
pushd public/
rm -f Dockerfile Gruntfile.js Procfile app.json package.json requirements.txt runserver.py
rm -rf pogom/ config/ templates/ Easy\ Setup/ node_modules/
popd
popd
zip -r "$ZIPFILE" pokemap/
popd
unzip /tmp/pokemap-build/"$ZIPFILE" -d /tmp/pokemap-build/test/