mirror of
https://github.com/boostorg/python.git
synced 2026-01-19 04:22:16 +00:00
Install documentation for development branch separately.
This commit is contained in:
@@ -5,11 +5,19 @@ SOURCE_BRANCH="master"
|
||||
TARGET_BRANCH="gh-pages"
|
||||
|
||||
# Pull requests and commits to other branches shouldn't try to deploy, just build to verify
|
||||
if [ "$TRAVIS_PULL_REQUEST" != "false" ] || [ "$TRAVIS_BRANCH" != master -a "$TRAVIS_BRANCH" != develop ]; then
|
||||
if [ "$TRAVIS_PULL_REQUEST" != "false" ] || \
|
||||
[ "$TRAVIS_BRANCH" != master -a \
|
||||
"$TRAVIS_BRANCH" != develop -a \
|
||||
"$TRAVIS_BRANCH" != travis ]; then
|
||||
echo "No docs to upload."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -z "$GH_TOKEN" ]; then
|
||||
echo "Error: GH_TOKEN is undefined"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Save some useful information
|
||||
REPO=`git config remote.origin.url`
|
||||
SHA=`git rev-parse --verify HEAD`
|
||||
@@ -27,12 +35,23 @@ git remote add upstream "https://$GH_TOKEN@github.com/boostorg/python.git"
|
||||
git fetch upstream
|
||||
git reset upstream/gh-pages
|
||||
|
||||
# Prepare version.
|
||||
if [ "$TRAVIS_BRANCH" = develop -o "$TRAVIS_BRANCH" = travis ]; then
|
||||
mkdir -p develop/doc/
|
||||
cp ../index.html develop/
|
||||
cp ../doc/index.html develop/doc/
|
||||
cp -a doc/html develop/doc/
|
||||
git add develop/index.html
|
||||
git add develop/doc/index.html
|
||||
git add -A develop/doc/html
|
||||
else
|
||||
cp ../index.html .
|
||||
cp ../doc/index.html doc/
|
||||
git add index.html
|
||||
git add doc/index.html
|
||||
git add -A doc/html
|
||||
fi
|
||||
# Commit the new version.
|
||||
cp ../index.html .
|
||||
cp ../doc/index.html doc/
|
||||
git add index.html
|
||||
git add doc/index.html
|
||||
git add -A doc/html
|
||||
git commit -m "Deploy to GitHub Pages: ${SHA}"
|
||||
|
||||
# Now that we're all set up, we can push.
|
||||
|
||||
37
.travis.yml
37
.travis.yml
@@ -11,23 +11,26 @@ dist: trusty
|
||||
|
||||
language: cpp
|
||||
|
||||
env:
|
||||
global:
|
||||
- secure: BRNUkxN3p8f+uYKWC3Hr0VPqZA0PxbWr1DJlcI4hbiZtzKhMCWjDmd9UW9CzzexqeOxpd+9s0G87qvOur+wMSVxugDxtTesZrh1czXHeSVxgQrYD783XJtQJ9aYypbChkiboRD6Xpmbq7itwMuHBJMFtCuDxMynpU1jWwkyTf2Y=
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- compiler: gcc
|
||||
env: CXX=g++ PYTHON=python CXXFLAGS=-std=c++98
|
||||
- compiler: gcc
|
||||
env: CXX=g++ PYTHON=python CXXFLAGS=-std=c++11
|
||||
- compiler: gcc
|
||||
env: CXX=g++ PYTHON=python3 CXXFLAGS=-std=c++98
|
||||
- compiler: gcc
|
||||
env: CXX=g++ PYTHON=python3 CXXFLAGS=-std=c++11
|
||||
- compiler: clang
|
||||
env: CXX=clang++ PYTHON=python3 CXXFLAGS=-std=c++98
|
||||
- compiler: clang
|
||||
env: CXX=clang++ PYTHON=python3 CXXFLAGS=-std=c++11
|
||||
- env: PYTHON=python DOC=1
|
||||
global:
|
||||
- secure: pkZAwxzBDIVqGi+1LgZdnWjvd3cFuiTBZ2TryMWp4sy8B5EuCHoALOLwd8YreYNENJmZoZKdLXUhmMG82nLmzdWZiCvH2lavkimyHwjJYn6Qj6ayeDCwRvb6rXG6mdgNkQAhbkuDu6OJv0uvkcIU8fPom+ZLIABCPWs+gKNeOmA=
|
||||
- compiler: gcc
|
||||
env: CXX=g++ PYTHON=python CXXFLAGS=-std=c++98
|
||||
- compiler: gcc
|
||||
env: CXX=g++ PYTHON=python CXXFLAGS=-std=c++11
|
||||
- compiler: gcc
|
||||
env: CXX=g++ PYTHON=python3 CXXFLAGS=-std=c++98
|
||||
- compiler: gcc
|
||||
env: CXX=g++ PYTHON=python3 CXXFLAGS=-std=c++11
|
||||
- compiler: clang
|
||||
env: CXX=clang++ PYTHON=python3 CXXFLAGS=-std=c++98
|
||||
- compiler: clang
|
||||
env: CXX=clang++ PYTHON=python3 CXXFLAGS=-std=c++11
|
||||
- env: PYTHON=python DOC=1
|
||||
|
||||
|
||||
addons:
|
||||
apt:
|
||||
@@ -85,8 +88,8 @@ script:
|
||||
after_success:
|
||||
# Upload docs only when building upstream.
|
||||
- |
|
||||
if [ "$DOC" -a
|
||||
"$TRAVIS_REPO_SLUG" = "boostorg/python" -a
|
||||
if [ "$DOC" -a \
|
||||
"$TRAVIS_REPO_SLUG" = "boostorg/python" -a \
|
||||
"$TRAVIS_PULL_REQUEST" = "false" ]; then
|
||||
export GH_TOKEN
|
||||
.ci/upload_docs.sh
|
||||
|
||||
@@ -17,6 +17,9 @@ Welcome to Boost.Python, a C++ library which enables seamless interoperability b
|
||||
|
||||
See the [Boost.Python](http://boostorg.github.io/python) documentation for details.
|
||||
|
||||
!!! note
|
||||
Check out the [development version](http://boostorg.github.io/python/develop) of the documentation to see work in progress.
|
||||
|
||||
# Building 
|
||||
|
||||
While Boost.Python is part of the Boost C++ Libraries super-project, and thus can be compiled as part of Boost, it can also be compiled and installed stand-alone, i.e. against a pre-installed Boost package.
|
||||
|
||||
13
index.html
Normal file
13
index.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0; URL=doc/index.html">
|
||||
</head>
|
||||
<body>
|
||||
Automatic redirection failed, click this
|
||||
<a href="doc/index.html">link</a> <hr>
|
||||
<p>© Copyright Stefan Seefeld, 2015</p>
|
||||
<p>Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</p>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user