File tree Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Original file line number Diff line number Diff line change 1- # If the first argument is "composer"...
2- ifeq (composer,$(firstword $(MAKECMDGOALS ) ) )
3- # use the rest as arguments for "composer"
4- RUN_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS ) ) ,$(MAKECMDGOALS ) )
5- # ...and turn them into do-nothing targets
6- $(eval $(RUN_ARGS ) :;@:)
7- endif
81
9- .PHONY : ci test phpunit cs stan covers composer
2+ DEFAULT_GOAL := ci
3+ current_user := $(shell id -u)
4+ current_group := $(shell id -g)
5+ BUILD_DIR := $(PWD )
6+ DOCKER_FLAGS := --interactive --tty
7+ DOCKER_IMAGE := registry.gitlab.com/fun-tech/fundraising-frontend-docker:latest
108
11- DEFAULT_GOAL := ci
9+ install-php :
10+ docker run --rm $(DOCKER_FLAGS ) --volume $(BUILD_DIR ) :/app -w /app --volume ~ /.composer:/composer --user $(current_user ) :$(current_group ) $(DOCKER_IMAGE ) composer install $(COMPOSER_FLAGS )
11+
12+ update-php :
13+ docker run --rm $(DOCKER_FLAGS ) --volume $(BUILD_DIR ) :/app -w /app --volume ~ /.composer:/composer --user $(current_user ) :$(current_group ) $(DOCKER_IMAGE ) composer update $(COMPOSER_FLAGS )
1214
1315ci : test cs
1416
@@ -29,6 +31,5 @@ fix-cs:
2931 docker compose run --rm app ./vendor/bin/phpcbf -p -s
3032
3133
32- composer :
33- docker run --rm --interactive --tty --volume $(shell pwd) :/app -w /app\
34- --volume ~ /.composer:/composer --user $(shell id -u) :$(shell id -g) composer composer --no-scripts $(filter-out $@ ,$(MAKECMDGOALS ) )
34+ .PHONY : ci test phpunit cs stan composer fix-cs
35+
Original file line number Diff line number Diff line change 11services :
22 app :
3- image : php:8.2-alpine
3+ image : " registry.gitlab.com/fun-tech/fundraising-frontend-docker:latest "
44 volumes :
55 - ./:/usr/src/app
66 working_dir : /usr/src/app
You can’t perform that action at this time.
0 commit comments