|
15 | 15 | git clone --branch gh-pages --single-branch https://github.com/GoogleCloudPlatform/google-cloud-java/ tmp_gh-pages |
16 | 16 | mkdir -p tmp_gh-pages/$SITE_VERSION_BASE |
17 | 17 | mvn site -DskipTests -Djava.util.logging.config.file=logging.properties |
18 | | -mvn site:stage --quiet -Djava.util.logging.config.file=logging.properties -DtopSiteURL=http://googlecloudplatform.github.io/google-cloud-java/site/${SITE_VERSION_BASE}/ |
19 | | -cd tmp_gh-pages |
20 | 18 |
|
21 | | -for dir in ../target/staging/* |
| 19 | +version_bases=(${SITE_VERSION_BASE} latest) |
| 20 | +rm -rf tmp_gh-pages/latest |
| 21 | +mkdir tmp_gh-pages/latest |
| 22 | +for version_base in ${version_bases[@]} |
22 | 23 | do |
23 | | - cp -r ${dir}/* $SITE_VERSION_BASE/ |
| 24 | + mvn site:stage --quiet -Djava.util.logging.config.file=logging.properties -DtopSiteURL=http://googlecloudplatform.github.io/google-cloud-java/site/${version_base}/ |
| 25 | + cd tmp_gh-pages |
| 26 | + cp -r ../target/staging/*/* $version_base |
| 27 | + sed -i "s/{{SITE_VERSION}}/$SITE_VERSION/g" ${version_base}/index.html # Update "Quickstart with Maven" to reflect version change |
| 28 | + git add $version_base |
| 29 | + cd .. |
24 | 30 | done |
25 | 31 |
|
26 | | -sed -i "s/{{SITE_VERSION}}/$SITE_VERSION/g" ${SITE_VERSION_BASE}/index.html # Update "Quickstart with Maven" to reflect version change |
27 | | -git add $SITE_VERSION_BASE |
| 32 | +cd tmp_gh-pages |
28 | 33 | echo "<html><head><meta http-equiv=\"refresh\" content=\"0; URL='http://GoogleCloudPlatform.github.io/google-cloud-java/${SITE_VERSION_BASE}/index.html'\" /></head><body></body></html>" > index.html |
29 | 34 | git add index.html |
30 | 35 | echo "<html><head><script>window.location.replace('/google-cloud-java/${SITE_VERSION_BASE}/apidocs' + location.search)</script></head><body></body></html>" > apidocs/index.html |
31 | 36 | git add apidocs/index.html |
32 | 37 |
|
33 | | -cd .. |
34 | | -mvn site:stage --quiet -Djava.util.logging.config.file=logging.properties -DtopSiteURL=http://googlecloudplatform.github.io/google-cloud-java/site/latest/ |
35 | | -cd tmp_gh-pages |
36 | | -rm -rf latest |
37 | | -mkdir latest |
38 | | -for dir in ../target/staging/* |
39 | | -do |
40 | | - cp -r ${dir}/* latest/ |
41 | | -done |
42 | | - |
43 | | -sed -i "s/{{SITE_VERSION}}/$SITE_VERSION/g" latest/index.html # Update "Quickstart with Maven" to reflect version change |
44 | | -git add latest |
45 | | - |
46 | 38 | echo "Site generated under tmp_gh-pages/. The changes must be committed from that directory." |
0 commit comments