Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
R
rapidjson
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
rapidjson
Commits
370aa88f
Commit
370aa88f
authored
Jul 13, 2014
by
Milo Yip
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #68 from pah/travis-ci
Fix uploading Doxygen documentation to GH pages from Travis CI
parents
e5602835
8d8ce9e9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
9 deletions
+28
-9
.travis.yml
.travis.yml
+1
-0
travis-doxygen.sh
build/travis-doxygen.sh
+27
-9
No files found.
.travis.yml
View file @
370aa88f
...
...
@@ -9,6 +9,7 @@ env:
-
CONF=debug
-
CONF=release
global
:
-
GITHUB_REPO='miloyip/rapidjson'
# prepare for 32/64 bit multi-arch support
-
BITS=64
-
secure
:
"
HrsaCb+N66EG1HR+LWH1u51SjaJyRwJEDzqJGYMB7LJ/bfqb9mWKF1fLvZGk46W5t7TVaXRDD5KHFx9DPWvKn4gRUVkwTHEy262ah5ORh8M6n/6VVVajeV/AYt2C0sswdkDBDO4Xq+xy5gdw3G8s1A4Inbm73pUh+6vx+7ltBbk="
...
...
build/travis-doxygen.sh
View file @
370aa88f
...
...
@@ -10,8 +10,13 @@ DOXYGEN_TAR=${DOXYGEN_VER}.linux.bin.tar.gz
DOXYGEN_URL
=
"http://ftp.stack.nl/pub/users/dimitri/
${
DOXYGEN_TAR
}
"
DOXYGEN_BIN
=
"/usr/local/bin/doxygen"
GHPAGES_REPO
=
"miloyip/rapidjson"
GHPAGES_URL
=
"https://github.com/
${
GHPAGES_REPO
}
"
:
${
GITHUB_REPO
:
=
"miloyip/rapidjson"
}
GITHUB_HOST
=
"github.com"
GITHUB_CLONE
=
"git://
${
GITHUB_HOST
}
/
${
GITHUB_REPO
}
"
GITHUB_URL
=
"https://
${
GITHUB_HOST
}
/
${
GITHUB_PUSH
-
${
GITHUB_REPO
}}
"
# if not set, ignore password
#GIT_ASKPASS="${TRAVIS_BUILD_DIR}/gh_ignore_askpass.sh"
skip
()
{
echo
"
$@
"
1>&2
...
...
@@ -61,11 +66,12 @@ gh_pages_prepare()
cd
"
${
TRAVIS_BUILD_DIR
}
/doc"
;
[
!
-d
"html"
]
||
\
abort
"Doxygen target directory already exists."
git clone
--single-branch
-b
gh-pages
${
GHPAGES_URL
}
html
git
--version
git clone
--single-branch
-b
gh-pages
"
${
GITHUB_CLONE
}
"
html
cd
html
# setup git config (with defaults)
git config
--global
user.name
"
${
GIT_NAME
-travis
}
"
git config
--global
user.email
"
${
GIT_EMAIL
-
"travis@localhost"
}
"
git config user.name
"
${
GIT_NAME
-travis
}
"
git config user.email
"
${
GIT_EMAIL
-
"travis@localhost"
}
"
# clean working dir
rm
-f
.git/index
git clean
-df
...
...
@@ -77,6 +83,15 @@ gh_pages_commit() {
git diff-index
--quiet
HEAD
||
git commit
-m
"Automatic doxygen build"
;
}
gh_setup_askpass
()
{
cat
>
${
GIT_ASKPASS
}
<<
EOF
#!/bin/bash
echo
exit 0
EOF
chmod
a+x
"
$GIT_ASKPASS
"
}
gh_pages_push
()
{
# check for secure variables
[
"
${
TRAVIS_SECURE_ENV_VARS
}
"
=
"true"
]
||
\
...
...
@@ -89,11 +104,14 @@ gh_pages_push() {
cd
"
${
TRAVIS_BUILD_DIR
}
/doc/html"
;
# setup credentials (hide in "set -x" mode)
git config core.askpass /bin/true
(
set
+x
;
git config credential.
${
GHPAGES_URL
}
.username
"
${
GH_TOKEN
}
"
)
git remote set-url
--push
origin
"
${
GITHUB_URL
}
"
git config credential.helper
'store'
# ( set +x ; git config credential.username "${GH_TOKEN}" )
(
set
+x
;
\
echo
"https://
${
GH_TOKEN
}
:@
${
GITHUB_HOST
}
"
>
${
HOME
}
/.git-credentials
;
\
chmod
go-rw
${
HOME
}
/.git-credentials
)
# push to GitHub
git push origin gh-pages
||
\
skip
"GitHub pages update failed, temporarily ignored."
git push origin gh-pages
}
doxygen_install
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment