mirror of
https://github.com/fankes/moshi.git
synced 2025-10-18 23:49:21 +08:00
Basic project structure.
This commit is contained in:
41
deploy_javadoc.sh
Executable file
41
deploy_javadoc.sh
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
REPO="git@github.com:square/moshi.git"
|
||||
GROUP_ID="com.squareup.moshi"
|
||||
ARTIFACT_ID="moshi"
|
||||
|
||||
DIR=temp-clone
|
||||
|
||||
# Delete any existing temporary website clone
|
||||
rm -rf $DIR
|
||||
|
||||
# Clone the current repo into temp folder
|
||||
git clone $REPO $DIR
|
||||
|
||||
# Move working directory into temp folder
|
||||
cd $DIR
|
||||
|
||||
# Checkout and track the gh-pages branch
|
||||
git checkout -t origin/gh-pages
|
||||
|
||||
# Delete everything
|
||||
rm -rf *
|
||||
|
||||
# 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
|
||||
unzip javadoc.zip
|
||||
rm javadoc.zip
|
||||
|
||||
# Stage all files in git and create a commit
|
||||
git add .
|
||||
git add -u
|
||||
git commit -m "Website at $(date)"
|
||||
|
||||
# Push the new files up to GitHub
|
||||
git push origin gh-pages
|
||||
|
||||
# Delete our temp folder
|
||||
cd ..
|
||||
rm -rf $DIR
|
Reference in New Issue
Block a user