-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #319 from fnothaft/publish-scaladoc
Adding scripts for publishing scaladoc.
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
|
||
# get current sha1 | ||
sha1=$(git log -1 --pretty=format:%H) | ||
|
||
# generate scaladoc | ||
mvn scala:doc | ||
|
||
# get current scaladoc dir | ||
scaladoc=${PWD}/adam-core/target/site/scaladocs/ | ||
|
||
# clone repo | ||
git clone git@github.com:bigdatagenomics/bigdatagenomics.github.io.git | ||
|
||
# get maven artifact version | ||
version=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v "\[") | ||
|
||
# clean and make new dir | ||
bdgscaladocdir=${PWD}/bigdatagenomics.github.io/projects/adam/scaladoc/${version} | ||
rm -rf ${bdgscaladocdir} | ||
mkdir -p ${bdgscaladocdir} | ||
|
||
# copy scaladoc over | ||
cp -rv ${scaladoc}/* ${bdgscaladocdir} | ||
|
||
# step into repo | ||
cd bigdatagenomics.github.io | ||
|
||
# mark for add and commit | ||
git add projects/adam/scaladoc/${version}/* | ||
git commit -m "Adding scaladoc for ADAM commit ${sha1}." | ||
git push origin master | ||
|
||
# clean up bdg repo | ||
cd .. | ||
rm -rf bigdatagenomics.github.io |