Skip to content

Commit

Permalink
Moved JavaDoc deploy task to gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewReitz committed Apr 17, 2015
1 parent 61b8532 commit baff2f1
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 37 deletions.
39 changes: 39 additions & 0 deletions shillelagh-parent.gradle → build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,42 @@ allprojects {
configFile = new File(rootDir, "checkstyle.xml")
}
}

task publishJavadoc(type: Exec) {
dependsOn "javadoc"
commandLine "bash", "-c",
'''
REPO="[email protected]:pieces029/shillelagh.git"
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 *
# Copy everything from javadocs folder
cp -r ../shillelagh/build/docs/javadoc/* .
# 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
'''
}
36 changes: 0 additions & 36 deletions deploy_javadoc.sh

This file was deleted.

1 change: 0 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def setBuildFile(project) {
}
}

setBuildFile(rootProject)
rootProject.children.each {
setBuildFile(it)
}

0 comments on commit baff2f1

Please sign in to comment.