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

Geowave 884 3 #941

Merged
merged 2 commits into from Nov 15, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 21 additions & 2 deletions .utility/publish-docs.sh
Expand Up @@ -7,6 +7,10 @@ if [ "$TRAVIS_REPO_SLUG" == "ngageoint/geowave" ] && [ "$BUILD_DOCS" == "true" ]
pandoc -f markdown -t html -s -c stylesheets/changelog.css CHANGELOG.md > changelog.html
cp changelog.html target/site/

# Get the version from the build.properties file
filePath=deploy/target/classes/build.properties
GEOWAVE_VERSION=$(grep project.version $filePath| awk -F= '{print $2}')

echo -e "Publishing site ...\n"
cp -R target/site $HOME/site

Expand All @@ -15,7 +19,22 @@ if [ "$TRAVIS_REPO_SLUG" == "ngageoint/geowave" ] && [ "$BUILD_DOCS" == "true" ]
git config --global user.name "travis-ci"
git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/ngageoint/geowave gh-pages > /dev/null

cd gh-pages
cd gh-pages

# Check if this is not a snapshot version
if [[ ! "$GEOWAVE_VERSION" =~ "SNAPSHOT" ]] ; then

# Make a new directory for this release and copy the contents to it
echo "creating a new versioned documentation directory"
mkdir previous-versions/$GEOWAVE_VERSION
cp -Rf $HOME/site/* previous-versions/$GEOWAVE_VERSION/
rm -f previous-versions/$GEOWAVE_VERSION/*.epub *.pdf *.pdfmarks

fi

# Save previous versions of the documentation
cp -r previous-versions/ $HOME/site/

git rm -rf .
cp -Rf $HOME/site/* .

Expand All @@ -29,4 +48,4 @@ if [ "$TRAVIS_REPO_SLUG" == "ngageoint/geowave" ] && [ "$BUILD_DOCS" == "true" ]

echo -e "Published Javadoc to gh-pages.\n"

fi
fi