use pwd to detect current directory path.

This commit is contained in:
Nick Minkler 2014-06-23 14:14:28 -07:00
parent 38c64ece87
commit ab597509bb

View File

@ -1,5 +1,6 @@
#!/bin/bash
current_dir=`pwd`
if [[ "$TRAVIS_REPO_SLUG" != "MilkBowl/VaultAPI" || "$TRAVIS_PULL_REQUEST" == "true" || "$TRAVIS_BRANCH" != "master" ]]
then
echo 'Travis can only publish docs for release builds.'
@ -15,7 +16,7 @@ git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/MilkBowl/Vaul
# Commit and Push the Changes
cd gh-pages
git rm -rf *
cp -Rfv $HOME/MilkBowl/VaultAPI/target/javadoc-latest/* ./
cp -Rfv $current_dir/target/javadoc-latest/* ./
git add -f .
git commit -m "Latest javadoc on successful travis build $TRAVIS_BUILD_NUMBER auto-pushed to gh-pages"
git push -fq origin gh-pages > /dev/null