From fc761429ad301af9af07861fe4842353f6725586 Mon Sep 17 00:00:00 2001 From: Jack Fitch <55409055+Jack1424@users.noreply.github.com> Date: Tue, 28 Jun 2022 14:49:14 -0400 Subject: [PATCH] enhanced do-publish.sh --- .utility/do-publish.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.utility/do-publish.sh b/.utility/do-publish.sh index f663952..50d38b7 100755 --- a/.utility/do-publish.sh +++ b/.utility/do-publish.sh @@ -1,5 +1,5 @@ #!/bin/bash -current_dir=`pwd` +current_dir=$(pwd) if [[ "$TRAVIS_REPO_SLUG" != "MilkBowl/VaultAPI" || "$TRAVIS_PULL_REQUEST" == "true" || "$TRAVIS_BRANCH" != "master" ]] then @@ -10,15 +10,15 @@ fi mvn clean javadoc:javadoc javadoc:jar deploy --settings .utility/settings.xml # Get to the Travis build directory, configure git and clone the repo -cd $HOME +cd "$HOME" git config --global user.email "travis@travis-ci.org" git config --global user.name "travis-ci" -git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/MilkBowl/VaultAPI gh-pages > /dev/null +git clone --quiet --branch=gh-pages https://"${GH_TOKEN}"@github.com/MilkBowl/VaultAPI gh-pages > /dev/null # Commit and Push the Changes cd gh-pages -git rm -rf * -cp -Rfv $current_dir/target/javadoc-latest/* ./ +git rm -rf ./* +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