-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
51 lines (39 loc) · 1018 Bytes
/
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
51
.PHONY: default
default: test upload
.PHONY: help
help:
@sed '/^.PHONY/!d; s/^.PHONY: //' Makefile
.PHONY: test
test:
yarn run cypress run
.PHONY: docker-build
docker-build:
docker build -t listicator .
.PHONY: docker-serve
docker-serve: docker-build
docker run --rm -p 127.0.0.1:8008:80 listicator
.PHONY: docker-deploy
docker-deploy:
docker build -t listicator:deploy --target=deployer .
.PHONY: docker-upload
docker-upload:
docker run --rm -v$(HOME)/.aws/credentials:/root/.aws/credentials listicator:deploy upload
.PHONY: docker-final
docker-final:
docker run --rm -v$(HOME)/.aws/credentials:/root/.aws/credentials listicator:deploy final
.PHONY: upload
upload: build
aws s3 sync build s3://listicator.work/
.PHONY: final
final: build
echo "Waiting before upload…"
sleep 5
aws s3 sync build s3://listicator.com/
.PHONY: build
build:
git diff --quiet
yarn build
git tag deploy-`date --iso-8601=seconds`
.PHONY: last-deploy
last-deploy:
git checkout `git tag --sort=-refname | head -n1`