Skip to content

Commit

Permalink
Grab the latest javadoc when deploying the website.
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeWharton committed May 6, 2013
1 parent b5ee649 commit 8eda990
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion deploy_website.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@

set -ex

REPO="git@github.com:square/okhttp.git"
GROUP_ID="com.squareup.okhttp"
ARTIFACT_ID="okhttp"

DIR=temp-clone

# Delete any existing temporary website clone
rm -rf $DIR

# Clone the current repo into temp folder
git clone git@github.com:square/okhttp.git $DIR
git clone $REPO $DIR

# Move working directory into temp folder
cd $DIR
Expand All @@ -22,6 +26,11 @@ rm -rf *
# Copy website files from real repo
cp -R ../website/* .

# Download the latest javadoc
curl -L "http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=$GROUP_ID&a=$ARTIFACT_ID&v=LATEST&c=javadoc" > javadoc.zip
mkdir javadoc
unzip javadoc.zip -d javadoc

# Stage all files in git and create a commit
git add .
git add -u
Expand Down
2 changes: 1 addition & 1 deletion website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ <h3 id="license">License</h3>
<li><a href="#license">License</a></li>
</ul>
<ul class="nav nav-pills nav-stacked secondary">
<li><a href="#">Javadoc</a></li>
<li><a href="javadoc/index.html">Javadoc</a></li>
<li><a href="https://plus.google.com/communities/109244258569782858265">Google+</a></li>
</ul>
</div>
Expand Down

0 comments on commit 8eda990

Please sign in to comment.