Skip to content

Commit b02e57b

Browse files
tcoffee-googlelesv
authored andcommitted
Update release process for Javadoc update (#116)
* Update release process for Javadoc update * Add copyright and license
1 parent 6bc70a2 commit b02e57b

2 files changed

Lines changed: 62 additions & 4 deletions

File tree

google-auth-library-java/RELEASE.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ Versioning
6666
Minor changes should be a point increase (0.6.0 -> 0.6.1). Additions to API or breaking changes should be
6767
a major release. (0.6.0 -> 0.7.0)
6868

69-
Deploy to Sonatype
70-
------------------
69+
Prepare release
70+
---------------
7171
* Update all ```pom.xml``` files in the package to the release version you want.
7272
* Update version numbers appearing in `README.md`.
7373
* Submit a pull request, get it reviewed, and submit.
@@ -76,10 +76,11 @@ Deploy to Sonatype
7676
* If there is a problem, undo by ```mvn nexus-staging:drop```.
7777
* ```mvn nexus-staging:release -DperformRelease=true```
7878
* On the [releases](https://github.com/google/google-auth-library-java/releases) page, create a corresponding Git tag (e.g., "v0.7.0") on the release commit, and summarize the commits since the last release. Follow the style of previous release notes.
79+
* Update Javadoc on Github using `update_javadoc.sh`.
7980
* Update all ```pom.xml``` files to the new snapshot version (increment patch version number, e.g., from 0.4.0 to 0.4.1-SNAPSHOT).
8081

81-
Publish the release
82-
-------------------
82+
Publish release
83+
---------------
8384
* Go to [Sonatype](https://oss.sonatype.org/) and log in
8485
* Click on *Staging Repositories* on the left
8586
* Filter down to the repository by typing the package's groupId without periods in the search box
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#!/bin/bash
2+
3+
# Copyright 2017, Google Inc. All rights reserved.
4+
#
5+
# Redistribution and use in source and binary forms, with or without
6+
# modification, are permitted provided that the following conditions are
7+
# met:
8+
#
9+
# * Redistributions of source code must retain the above copyright
10+
# notice, this list of conditions and the following disclaimer.
11+
# * Redistributions in binary form must reproduce the above
12+
# copyright notice, this list of conditions and the following disclaimer
13+
# in the documentation and/or other materials provided with the
14+
# distribution.
15+
#
16+
# * Neither the name of Google Inc. nor the names of its
17+
# contributors may be used to endorse or promote products derived from
18+
# this software without specific prior written permission.
19+
#
20+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21+
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22+
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23+
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24+
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25+
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26+
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27+
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28+
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31+
32+
set -e
33+
34+
VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -Ev '(^\[|\w+:)')
35+
36+
if [ -z "$VERSION" ]; then
37+
echo "Error updating Javadoc: could not obtain version number from maven-help-plugin."
38+
exit 1
39+
fi
40+
41+
git clone --branch gh-pages --single-branch https://github.com/google/google-auth-library-java/ tmp_gh-pages
42+
mkdir -p tmp_gh-pages/releases/$VERSION
43+
44+
mvn javadoc:aggregate
45+
46+
pushd tmp_gh-pages/
47+
cp -r ../target/site/* releases/$VERSION/
48+
git add releases/$VERSION
49+
50+
echo "<html><head><meta http-equiv=\"refresh\" content=\"0; URL='http://google.github.io/google-auth-library-java/releases/${VERSION}/apidocs/index.html'\" /></head><body></body></html>" > index.html
51+
git add index.html
52+
53+
git commit --quiet -m "Add version $VERSION and update root redirect [ci skip]"
54+
git push
55+
56+
popd
57+
rm -rf tmp_gh-pages

0 commit comments

Comments
 (0)