forked from php/doc-en
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Makefile instead of docker-compose.yml (php#3673)
* Use environment variable for format to build * Use Makefile instead of docker-compose.yml This allows us to build different formats more easily, and use phd and doc-base from parallel checkouts, which is much easier for issues that span the repositories.
- Loading branch information
Showing
5 changed files
with
48 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
entities.*.xml | ||
output | ||
.docker/built |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
.PHONY: * | ||
|
||
SHELL = /bin/sh | ||
|
||
CURRENT_UID := $(shell id -u) | ||
CURRENT_GID := $(shell id -g) | ||
|
||
# | ||
# If doc-base or phd exist as siblings to the current directory, add those as | ||
# volumes to our Docker runs. | ||
# | ||
|
||
PATHS := -v .:/var/www/en | ||
ifneq ($(wildcard ../doc-base/LICENSE),) | ||
PATHS += -v ${PWD}/../doc-base:/var/www/doc-base | ||
endif | ||
ifneq ($(wildcard ../phd/LICENSE),) | ||
PATHS += -v ${PWD}/../phd:/var/www/phd | ||
endif | ||
|
||
xhtml: .docker/built | ||
docker run ${PATHS} -w /var/www -u ${CURRENT_UID}:${CURRENT_GID} php/doc-en | ||
|
||
php: .docker/built | ||
docker run ${PATHS} -w /var/www -u ${CURRENT_UID}:${CURRENT_GID} \ | ||
-e FORMAT=php php/doc-en | ||
|
||
build: .docker/built | ||
|
||
.docker/built: | ||
docker build .docker -t php/doc-en | ||
touch .docker/built |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.