View up-to-date API documentation in GitHub
Deploy current herd API under the relative herd release identifier to GitHub Pages
@@ -20,9 +20,15 @@ before_script:
- cd ..
script:
- mvn clean install --batch-mode -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
+ - export HERD_PROJECT_VERSION=`mvn --batch-mode -f pom.xml help:evaluate -Dexpression=project.version | grep -Ev '(^\[|Download\w+:)' | sed 's/-SNAPSHOT//'`
+ - echo ${HERD_PROJECT_VERSION}
+ - rm -rf public/docs/${HERD_PROJECT_VERSION}
+ - mkdir --parents public/docs/${HERD_PROJECT_VERSION}
+ - cp -a herd-code/herd-war/target/generated-resources/herd-docs-swagger-${HERD_PROJECT_VERSION}-SNAPSHOT/docs/rest/. public/docs/${HERD_PROJECT_VERSION}/rest
+ - cp -a herd-code/herd-war/target/generated-resources/javadoc/docs/javadoc/. public/docs/${HERD_PROJECT_VERSION}/javadoc
- rm -rf public/docs/latest
- mkdir --parents public/docs/latest
- - cp -a herd-code/herd-war/target/generated-resources/herd-docs-swagger-*/docs/rest/. public/docs/latest/rest
+ - cp -a herd-code/herd-war/target/generated-resources/herd-docs-swagger-${HERD_PROJECT_VERSION}-SNAPSHOT/docs/rest/. public/docs/latest/rest
- cp -a herd-code/herd-war/target/generated-resources/javadoc/docs/javadoc/. public/docs/latest/javadoc
deploy:
provider: pages
