Skip to content

Commit 418ca14

Browse files
committed
Add make target to update composer.lock
Allows developers to update the engine's PHP dependencies without requiring a local PHP environment. Assumes a codeclimate-phpmd image is present, within which to run the composer.phar update.
1 parent 818733c commit 418ca14

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Diff for: Makefile

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1-
.PHONY: image
1+
.PHONY: image composer-update
22

33
IMAGE_NAME ?= codeclimate/codeclimate-phpmd
44

55
image:
6-
docker build --tag codeclimate/codeclimate-phpmd .
6+
docker build --tag $(IMAGE_NAME) .
7+
8+
composer-update:
9+
docker run \
10+
--rm \
11+
--volume $(PWD)/composer.json:/usr/src/app/composer.json:ro \
12+
$(IMAGE_NAME) \
13+
sh -c 'php composer.phar update && cat composer.lock' > composer.lock

0 commit comments

Comments
 (0)