File tree Expand file tree Collapse file tree 2 files changed +42
-9
lines changed Expand file tree Collapse file tree 2 files changed +42
-9
lines changed Original file line number Diff line number Diff line change 1- #! /bin/sh
1+ #! /bin/bash
2+
3+ . $( pwd) /release-versions.txt
24
35MESSAGE=$( git log -1 --pretty=%B)
46./mvnw clean buildnumber:create pre-site
57
68./mvnw javadoc:javadoc
79
10+ RELEASE_VERSION=$( cat pom.xml | grep -oPm1 " (?<=<version>)[^<]+" )
11+
812# Concourse does shallow clones, so need the next 2 commands to have the gh-pages branch
913git remote set-branches origin ' gh-pages'
1014git fetch -v
15+
1116git checkout gh-pages
12- mkdir -p snapshot/htmlsingle
13- cp target/generated-docs/index.html snapshot/htmlsingle
14- mkdir -p snapshot/pdf
15- cp target/generated-docs/index.pdf snapshot/pdf
16- mkdir -p snapshot/api
17- cp -r target/site/apidocs/* snapshot/api/
18- git add snapshot/
17+ mkdir -p $RELEASE_VERSION /htmlsingle
18+ cp target/generated-docs/index.html $RELEASE_VERSION /htmlsingle
19+ mkdir -p $RELEASE_VERSION /pdf
20+ cp target/generated-docs/index.pdf $RELEASE_VERSION /pdf
21+ mkdir -p $RELEASE_VERSION /api
22+ cp -r target/site/apidocs/* $RELEASE_VERSION /api/
23+ git add $RELEASE_VERSION /
24+
25+ if [[ $LATEST == " true" ]]
26+ then
27+ if [[ $RELEASE_VERSION == * [RCM]* ]]
28+ then
29+ DOC_DIR=" milestone"
30+ elif [[ $RELEASE_VERSION == * SNAPSHOT* ]]
31+ then
32+ DOC_DIR=" snapshot"
33+ else
34+ DOC_DIR=" stable"
35+ fi
36+
37+ mkdir -p $DOC_DIR /htmlsingle
38+ cp target/generated-docs/index.html $DOC_DIR /htmlsingle
39+ mkdir -p $DOC_DIR /pdf
40+ cp target/generated-docs/index.pdf $DOC_DIR /pdf
41+ mkdir -p $DOC_DIR /api
42+ cp -r target/site/apidocs/* $DOC_DIR /api/
43+ git add $DOC_DIR /
44+
45+ fi
46+
1947git commit -m " $MESSAGE "
2048git push origin gh-pages
21- git checkout main
49+ git checkout main
Original file line number Diff line number Diff line change 1+ RELEASE_VERSION="0.1.0.RC1"
2+ DEVELOPMENT_VERSION="0.1.0-SNAPSHOT"
3+ RELEASE_BRANCH="main"
4+ LATEST=true
5+
You can’t perform that action at this time.
0 commit comments