PlantUML is downloaded by CI at build time
Avoids the need to keep the JAR file within the sources
This commit is contained in:
parent
92c490d3fc
commit
7f824b6145
|
@ -4,6 +4,11 @@ version: 2.0
|
|||
default: &default-steps
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
# Note: this makes it hard to reproduce builds but easier to spot incompatibilities with
|
||||
# newer PlantUML releases. Current trade off seems acceptable.
|
||||
name: Download the latest PlantUML release
|
||||
command: sh ./bin/download-plantuml.sh
|
||||
- run:
|
||||
name: Update APT packages
|
||||
command: apt-get update
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Where the script is executed
|
||||
CURRENT_PATH="$(dirname "$(readlink -f "$0")")"
|
||||
|
||||
# Where to download the file
|
||||
OUTPUT_PATH="${CURRENT_PATH}/plantuml.jar"
|
||||
|
||||
# Retrieve the list of versions, in XML format, only one result (the latest)
|
||||
VERSIONS_URL='https://search.maven.org/solrsearch/select?q=g:net.sourceforge.plantuml+AND+a:plantuml&core=gav&start=0&rows=1&wt=xml'
|
||||
|
||||
# Only match the contents of the version (name="v") XML tag
|
||||
LATEST_VERSION="$(curl "${VERSIONS_URL}" | grep -oP) '(?<=<str name=\"v\">).*?(?=</str>)'"
|
||||
|
||||
# Compose the download link
|
||||
DOWNLOAD_URL="https://search.maven.org/remotecontent?filepath=net/sourceforge/plantuml/plantuml/${LATEST_VERSION}/plantuml-${LATEST_VERSION}.jar"
|
||||
|
||||
# finally, download the JAR file
|
||||
curl -o "${OUTPUT_PATH}" "${DOWNLOAD_URL}"
|
BIN
bin/plantuml.jar
BIN
bin/plantuml.jar
Binary file not shown.
Loading…
Reference in New Issue