Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update plantuml JAR - Fix ability to use hexagon in plantuml diagrams #45

Merged
merged 1 commit into from
Mar 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ RUN export DEBIAN_FRONTEND="noninteractive" \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /docs-package/pdf /app /docs-src/book /docs-src/templates /docs-src/features


COPY ./composer.json \
./composer.lock \
./package.json \
Expand All @@ -72,6 +71,8 @@ COPY ./composer.json \
COPY ./src /app/src
COPY ./bin /app/bin

ADD https://github.com/plantuml/plantuml/releases/download/v1.2022.2/plantuml-1.2022.2.jar /app/bin/plantuml.jar

COPY --from=production-dependencies /usr/bin/composer /usr/local/bin/composer
COPY --from=npm-dependencies /app/node_modules /app/node_modules

Expand Down
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.PHONY: *

CLEAR_CONFIG_CACHE=rm -f storage/app/vars/*
OPTS=

help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

build: ## Builds the development image needed to run tests etc.
docker buildx build --load --target=development --tag=test-image .
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't review in time :)

If this is in the makefile the tag should be something like roave/docbooktool:test-image; this current one resolves to test-image:latest which isn't scoped to a vendor/project


test: build ## Run the unit and integration tests
docker run --rm --entrypoint=php test-image vendor/bin/phpunit

cs: build ## Run coding standards checks
docker run --rm --entrypoint=php test-image vendor/bin/phpcs

static-analysis: build ## Run the static analysis checks
docker run --rm --entrypoint=php test-image vendor/bin/psalm
Ocramius marked this conversation as resolved.
Show resolved Hide resolved
Binary file removed bin/plantuml.jar
Binary file not shown.
1 change: 1 addition & 0 deletions src/Formatter/RenderPlantUmlDiagramInline.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

final class RenderPlantUmlDiagramInline implements PageFormatter
{
/** Note: this is added by the `Dockerfile` build, it no longer exists in the repo itself */
private const PLANTUML_JAR = __DIR__ . '/../../bin/plantuml.jar';

/** @throws RuntimeException */
Expand Down
1 change: 1 addition & 0 deletions test/fixture/docbook/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ Links [here](https://www.google.com). **Bold**, _italic_, ~~strikethrough~~, `in
```puml
@startuml
Bob->Alice : hello
hexagon TestingHexagon
@enduml
```