mirror of
https://github.com/MilkBowl/VaultAPI.git
synced 2024-09-26 14:22:55 +02:00
enhanced do-publish.sh
This commit is contained in:
parent
52b8f72f15
commit
fc761429ad
@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
current_dir=`pwd`
|
current_dir=$(pwd)
|
||||||
|
|
||||||
if [[ "$TRAVIS_REPO_SLUG" != "MilkBowl/VaultAPI" || "$TRAVIS_PULL_REQUEST" == "true" || "$TRAVIS_BRANCH" != "master" ]]
|
if [[ "$TRAVIS_REPO_SLUG" != "MilkBowl/VaultAPI" || "$TRAVIS_PULL_REQUEST" == "true" || "$TRAVIS_BRANCH" != "master" ]]
|
||||||
then
|
then
|
||||||
@ -10,15 +10,15 @@ fi
|
|||||||
mvn clean javadoc:javadoc javadoc:jar deploy --settings .utility/settings.xml
|
mvn clean javadoc:javadoc javadoc:jar deploy --settings .utility/settings.xml
|
||||||
|
|
||||||
# Get to the Travis build directory, configure git and clone the repo
|
# 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.email "travis@travis-ci.org"
|
||||||
git config --global user.name "travis-ci"
|
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
|
# Commit and Push the Changes
|
||||||
cd gh-pages
|
cd gh-pages
|
||||||
git rm -rf *
|
git rm -rf ./*
|
||||||
cp -Rfv $current_dir/target/javadoc-latest/* ./
|
cp -Rfv "$current_dir"/target/javadoc-latest/* ./
|
||||||
git add -f .
|
git add -f .
|
||||||
git commit -m "Latest javadoc on successful travis build $TRAVIS_BUILD_NUMBER auto-pushed to gh-pages"
|
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
|
git push -fq origin gh-pages > /dev/null
|
||||||
|
Loading…
Reference in New Issue
Block a user