-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
39 lines (28 loc) · 851 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
VERSION := $(shell git branch | awk '{print $$2}')
lint: phpcs phpcbf phpstan
phpcs:
vendor/bin/phpcs src/
phpcbf:
vendor/bin/phpcbf src/
phpstan:
vendor/bin/phpstan analyse src/
phpunit:
vendor/bin/phpunit tests/*
dist: clean
echo "Building: ${VERSION}"
mkdir -p build/tmp/
cp -r src/* build/tmp/
mv build/tmp build/faridoon-${VERSION}/
zip -r build/faridoon-${VERSION}.zip build/faridoon-${VERSION}/
clean:
rm -rf build
container-image:
docker kill faridoon || true
docker rm faridoon && docker rmi faridoon || true
docker build -t faridoon:latest .
container: container-image
docker create --name faridoon -p 8080:8080 --env-file=.env.dev faridoon:latest
docker start faridoon
docker-container-image:
docker build -t localhost/faridoon/faridoon:latest -f Dockerfile .
.PHONY: dist clean docker-container-image container