Skip to content

Commit

Permalink
Makefile rules for testing on PHP versions with Docker.
Browse files Browse the repository at this point in the history
  • Loading branch information
chr15m committed Mar 15, 2024
1 parent 7615368 commit 22b394e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,15 @@ font-awesome/css font-awesome/fonts sortable/Sortable.min.js:
git submodule init
git submodule update

define DOCKER_RUN_TEMPLATE
docker-run-on-php-$(1): build/index.html
cd build && docker run -p 8000:80 -it --rm --name todomini -v "$$$$PWD":/usr/src/myapp -w /usr/src/myapp php:$(2)-cli php -S 0.0.0.0:80
endef

#docker-run-on-php-7: build/index.html
$(eval $(call DOCKER_RUN_TEMPLATE,7,7.0.33))
#docker-run-on-php-8: build/index.html
$(eval $(call DOCKER_RUN_TEMPLATE,8,8.2))

clean:
rm -rf $(TARGETS) build

0 comments on commit 22b394e

Please sign in to comment.