plantuml / plantuml-server

PlantUML Online Server
https://plantuml.com/
GNU General Public License v3.0
1.6k stars 462 forks source link

Docker: always build latest `graphviz` release #282

Closed HeinrichAD closed 1 year ago

HeinrichAD commented 1 year ago

Currently, every now and then there is a PR that sets the default graphviz version within Dockerfiles to the latest version.

With this PR the docker container will always/automatically use the latest graphviz release if the version was not set manually via the docker build argument GRAPHVIZ_VERSION.

close #150 who ased for a graphviz version update (way back in the past :smile:)


If somebody wants to review the PR here some note:

If not set as build arg fetch latest version of graphviz based on their release name by default. An alternative would be to use tag_name.

Also, to avoid the overhead of getting all kinds of relase data, GitLabs GraphQL interface could be used.

curl -s \
  -H "Content-Type:application/json" \
  -d '{"query": "{project(fullPath:\"graphviz/graphviz\"){releases(first:5,sort:RELEASED_AT_DESC){nodes{name}}}}"}' \
  "https://gitlab.com/api/graphql" \
| jq -r '.data.project.releases.nodes[].name' | sort -V -r | head -n 1

In GraphQL the alternative to name would be tagName.

These are possible changes for the future if somebody is unhappy with the current solution. But in my opinion this is not really necessary.