Skip to content

Commit

Permalink
Merge branch 'release/1.0.10'
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed May 3, 2022
2 parents ecba02f + 0fc916d commit 65aed61
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# nystudio107/matrixfacades Change Log

## 1.0.10 - 2022.05.03
### Changed
* Determine the separator character by checking the Docker Compose API version at runtime

## 1.0.9 - 2022.05.02
### Changed
* Use `su-exec` for the `craft`, `composer`, and `ssh` commands from the Makefile
Expand Down
17 changes: 12 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
CONTAINER?=$(shell basename $(CURDIR))-php-1
# Determine the docker compose API version to determine the separator character
VERSION?=$(shell docker compose version)
ifneq (,$(findstring v2.,$(VERSION)))
SEPARATOR:=-
else
SEPARATOR:=_
endif
CONTAINER?=$(shell basename $(CURDIR))$(SEPARATOR)php$(SEPARATOR)1

.PHONY: dev clean composer craft nuke ssh up

Expand All @@ -7,20 +14,20 @@ clean:
rm -f cms/composer.lock
rm -rf cms/vendor/
composer: up
docker exec -it ${CONTAINER} su-exec www-data composer \
docker exec -it $(CONTAINER) su-exec www-data composer \
$(filter-out $@,$(MAKECMDGOALS))
craft: up
docker exec -it ${CONTAINER} su-exec www-data php craft \
docker exec -it $(CONTAINER) su-exec www-data php craft \
$(filter-out $@,$(MAKECMDGOALS))
nuke:
docker-compose down -v
rm -f cms/composer.lock
rm -rf cms/vendor/
docker-compose up --build --force-recreate
ssh: up
docker exec -it ${CONTAINER} su-exec www-data /bin/sh
docker exec -it $(CONTAINER) su-exec www-data /bin/sh
up:
if [ ! "$$(docker ps -q -f name=${CONTAINER})" ]; then \
if [ ! "$$(docker ps -q -f name=$(CONTAINER))" ]; then \
cp -n cms/example.env cms/.env; \
docker-compose up; \
fi
Expand Down

0 comments on commit 65aed61

Please sign in to comment.