Sha256: afbe1d2bae19e000d4c87b963064fb69d07cff9c48a1e556b09e493aa29410d0

Contents?: true

Size: 1.21 KB

Versions: 130

Compression:

Stored size: 1.21 KB

Contents

#!/bin/bash

function re() {
    r "$@"
    if [ $? -ne 0 ];then
        exit $?
    fi
}

function r() {
    echo "$@"
    "$@"
}

[ "$TRAVIS_PULL_REQUEST" != "false" ] && exit 0
[ "$TRAVIS_BRANCH" != "master" -a "$TRAVIS_BRANCH" != "$(git describe --tags --always HEAD)" ] && exit 0

revision="$(git rev-parse HEAD)"
remote="https://github.com/embulk/embulk.github.io.git"
re ./gradlew site

r git fetch --unshallow || echo "using complete repository."

re rm -rf gh_pages
re git clone . gh_pages
re cd gh_pages

re git remote add travis_push "$remote"
re git fetch travis_push

re git checkout -b gh-pages travis_push/master
re rm -rf docs
re cp -a ../embulk-docs/build/html docs
re git add --all docs

re git config user.name "$GIT_USER_NAME"
re git config user.email "$GIT_USER_EMAIL"
r git commit -m "Updated document $revision"

git show | grep -E '^[+-] ' | grep -Eqv 'Generated by|Generated on|Search.setIndex|meta name="date" content='
if [ $? -ne 0 ];then
    echo "No document changes."
    exit 0
fi

re git config credential.helper "store --file=$HOME/.git_credentials"
echo "https://$GITHUB_TOKEN:@github.com" > "$HOME/.git_credentials"
trap "rm -rf $HOME/.git_credentials" EXIT
re git push travis_push gh-pages:master

Version data entries

130 entries across 130 versions & 1 rubygems

Version Path
embulk-0.8.39 embulk-docs/push-gh-pages.sh
embulk-0.8.39-java embulk-docs/push-gh-pages.sh
embulk-0.8.38 embulk-docs/push-gh-pages.sh
embulk-0.8.38-java embulk-docs/push-gh-pages.sh
embulk-0.8.37 embulk-docs/push-gh-pages.sh
embulk-0.8.37-java embulk-docs/push-gh-pages.sh
embulk-0.8.36 embulk-docs/push-gh-pages.sh
embulk-0.8.36-java embulk-docs/push-gh-pages.sh
embulk-0.8.35 embulk-docs/push-gh-pages.sh
embulk-0.8.35-java embulk-docs/push-gh-pages.sh
embulk-0.8.34 embulk-docs/push-gh-pages.sh
embulk-0.8.34-java embulk-docs/push-gh-pages.sh
embulk-0.8.33 embulk-docs/push-gh-pages.sh
embulk-0.8.33-java embulk-docs/push-gh-pages.sh
embulk-0.8.32 embulk-docs/push-gh-pages.sh
embulk-0.8.32-java embulk-docs/push-gh-pages.sh
embulk-0.8.31 embulk-docs/push-gh-pages.sh
embulk-0.8.31-java embulk-docs/push-gh-pages.sh
embulk-0.8.30 embulk-docs/push-gh-pages.sh
embulk-0.8.30-java embulk-docs/push-gh-pages.sh