From ab597509bbe4117df79d65ce1c23d97f88dcee0d Mon Sep 17 00:00:00 2001 From: Nick Minkler Date: Mon, 23 Jun 2014 14:14:28 -0700 Subject: [PATCH] use pwd to detect current directory path. --- .utility/do-publish.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.utility/do-publish.sh b/.utility/do-publish.sh index b7adacb..db39010 100644 --- a/.utility/do-publish.sh +++ b/.utility/do-publish.sh @@ -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