Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding scripts for publishing scaladoc. #319

Merged
merged 1 commit into from
Jul 22, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions scripts/publish-scaladoc.sh
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