-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
35 lines (28 loc) · 1.03 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
.PHONY: default update-all deploy demowebsite-update docker-update
SHELL=/bin/bash
include $(wildcard deploy.config)
default:
curl -L "https://github.com/vrana/adminer/releases/download/v4.3.1/adminer-4.3.1-en.php" > adminer.php
update-all:
git push origin master
$(MAKE) deploy
$(MAKE) demowebsite-update
$(MAKE) docker-update
deploy:
rsync -va --delete --exclude=config.ini -e ssh . "$(SSH_PATH)"
demowebsite-update:
DIR="$$(mktemp -d)" && \
git clone -b demowebsite --single-branch [email protected]:SuRaMoN/weave-gitstats.git "$$DIR" && \
rm -Rf "$$DIR"/* && \
docker run -p 8080:80 -e GIT_URL="https://github.com/symfony/yaml.git" "$$(docker build -q .)" ./export php://stdout > "$$DIR/weave.zip" && \
cd "$$DIR" && \
rm -Rf *.csv && \
unzip "weave.zip" && rm "weave.zip" && \
git add . && git add -u . && \
git commit --amend -m 'Demo website' && \
git push -f origin demowebsite && \
rm -Rf "$$DIR"
docker-update:
HASH="$$(docker build -q .)" && \
docker tag "$$HASH" suramon/weave-gitstats
docker push suramon/weave-gitstats