-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
51 lines (38 loc) · 1.6 KB
/
Makefile
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
40
41
42
43
44
45
46
47
48
49
50
#export GH_USER="lucasgautheron"
#export GITHUB_TOKEN=""
.PHONY: all clean simulations website booklet deploy
all:
php compile.php -V -B -S
clean:
find tmp/ ! -name '.gitignore' -type f -exec rm -f {} +
find . -name "*.html" -type f -delete
find . -type d -empty -delete
rm booklet/booklet.pdf
simulations:
php compile.php -V -B
website:
php compile.php -V
booklet:
php compile.php -V -B
deploy:
git archive --format=tar master -o deployment/master.tar
rm -rf deployment/public
mkdir deployment/public
tar xvf deployment/master.tar -C deployment/public
rm -rf deployment/master.tar
cd deployment/public && \
make all && \
rm -rf data && \
rm -rf *.xsl && \
rm -rf tmp && \
find booklet/ ! -name 'booklet.pdf' -type f -exec rm -f {} +
cd deployment && \
firebase --project cosmology-c47d4 deploy && \
tar -jcvf public.tar.bz2 public/
if [ ! -f deployment/linux-amd64-github-release.tar.bz2 ]; then \
wget https://github.com/aktau/github-release/releases/download/v0.6.2/linux-amd64-github-release.tar.bz2 -P deployment/; \
fi
tar jxvf deployment/linux-amd64-github-release.tar.bz2 -C deployment
-exec ./deployment/bin/linux/amd64/github-release delete --user lucasgautheron --repo CosmologyWebsite --tag `date +%Y-%m-%d`
exec ./deployment/bin/linux/amd64/github-release release --user lucasgautheron --repo CosmologyWebsite --tag `date +%Y-%m-%d` --name "Deployment $${RELEASE_VERSION}" --description ""
exec ./deployment/bin/linux/amd64/github-release upload --user lucasgautheron --repo CosmologyWebsite --tag `date +%Y-%m-%d` --name "public.tar.bz2" --file deployment/public.tar.bz2