-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
28 lines (22 loc) · 802 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
COMPOSER_HOME ?= ${HOME}
CURRENT_UID := $(shell id -u)
CURRENT_GID := $(shell id -g)
YEAR ?= $(shell date +"%Y")
DAY ?= $(shell date +"%d")
.PHONY: run all bootstrap clean tests
run: vendor
docker-compose run -u $(CURRENT_UID) -T --rm php application.php aoc:run $(YEAR) $(DAY)
all: vendor
docker-compose run -u $(CURRENT_UID) -T --rm php application.php aoc:run --all
bootstrap: vendor
docker-compose run -u $(CURRENT_UID) -T --rm php application.php aoc:bootstrap --next
vendor:
docker run --rm -it \
-u $(CURRENT_UID):$(CURRENT_GID) \
-v $(dir $(abspath $(lastword $(MAKEFILE_LIST)))):/app \
-v ${COMPOSER_HOME}/.composer:/tmp/.composer \
composer:2.4.4 composer install -n
tests: vendor
docker-compose run -u $(CURRENT_UID) -T --rm php ./vendor/bin/phpunit
clean:
rm -rf vendor