This repository has been archived by the owner on Aug 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configuring travis to upload wikies on gh-pages branch, #51
- Loading branch information
Showing
2 changed files
with
10 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,17 +5,21 @@ set -e # Exit with nonzero exit code if anything fails | |
# Save some useful information | ||
REPO_URL=`git config remote.origin.url` | ||
SHA=`git rev-parse --verify HEAD` | ||
VERSION=`grep -P '^__version__ =' wolf/__init__.py | grep -oP \ | ||
'([1-9]\d*!)?(0|[1-9]\d*)(\.(0|[1-9]\d*))*((a|b|rc)(0|[1-9]\d*))?(\.post(0|[1-9]\d*))?(\.dev(0|[1-9]\d*))?'` | ||
VERSION="v${VERSION}" | ||
if [ -z "$1" ]; then | ||
VERSION=`grep -P '^__version__ =' wolf/__init__.py | grep -oP \ | ||
'([1-9]\d*!)?(0|[1-9]\d*)(\.(0|[1-9]\d*))*((a|b|rc)(0|[1-9]\d*))?(\.post(0|[1-9]\d*))?(\.dev(0|[1-9]\d*))?'` | ||
VERSION="v${VERSION}" | ||
else | ||
VERSION=$1 | ||
fi | ||
TARGET="../project-gh-pages/$VERSION" | ||
# Clone/checkout the gh-pages branch from Github alongside the master branch working copy | ||
# directory: | ||
rm -rf ../project-gh-pages | ||
git -C .. clone [email protected]:Carrene/wolf.git -b gh-pages project-gh-pages | ||
GIT="git -C ../project-gh-pages" | ||
$GIT rm $VERSION/\*.md | ||
mkdir -p $TARGET | ||
$GIT rm $VERSION/\*.md | ||
cp data/documentation/*.md $TARGET | ||
$GIT add $VERSION/\*.md | ||
$GIT config user.name "Travis CI" | ||
|