Skip to content

Commit a0f3786

Browse files
committed
utilities: also create latest directory
This commit makes create_site.sh create directory "latest", containing the docs for the latest release. This commit also fixes a bug. Previously, create_site chooses to copy only files in directory whose names begin with the current version. Since the current version of google-cloud-java is 0.y.z, libraries in alpha and beta are copied properly. However, libraries in GA are not copied, because their versions are x.y.z where x is not 0.
1 parent 0e4ed46 commit a0f3786

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

utilities/create_site.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ mvn site -DskipTests -Djava.util.logging.config.file=logging.properties
1818
mvn site:stage --quiet -Djava.util.logging.config.file=logging.properties -DtopSiteURL=http://googlecloudplatform.github.io/google-cloud-java/site/${SITE_VERSION_BASE}/
1919
cd tmp_gh-pages
2020

21-
for dir in ../target/staging/${SITE_VERSION_BASE}*
21+
for dir in ../target/staging/*
2222
do
2323
cp -r ${dir}/* $SITE_VERSION_BASE/
2424
done
@@ -30,4 +30,17 @@ git add index.html
3030
echo "<html><head><script>window.location.replace('/google-cloud-java/${SITE_VERSION_BASE}/apidocs' + location.search)</script></head><body></body></html>" > apidocs/index.html
3131
git add apidocs/index.html
3232

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+
3346
echo "Site generated under tmp_gh-pages/. The changes must be committed from that directory."

0 commit comments

Comments
 (0)