-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split docs publish up into scripts, add new tag to index on publish
- Loading branch information
Showing
4 changed files
with
39 additions
and
10 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
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
: ${TRAVIS:?'This should only be run on Travis CI'} | ||
TAG=${1:?'Must provide tag'} | ||
|
||
# Setup this repo to publish the docs | ||
git fetch origin gh-pages | ||
git checkout gh-pages | ||
|
||
# Move the built docs into versioned folder | ||
mv target/doc docs/$TAG | ||
|
||
# Update the index to point to the versioned docs | ||
sed -i '' -e '/<!-- DOCS INDEX -->/i\ | ||
<li><a href="docs/'"$TAG"'/roaring/">'"$TAG"'</a></li>' \ | ||
index.html | ||
|
||
# Add the changes | ||
git add docs/$TAG | ||
git add index.html | ||
|
||
# Commit and push | ||
git commit -m "Add API docs for $TAG" | ||
git push |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
: ${TRAVIS:?'This should only be run on Travis CI'} | ||
GITHUB_TOKEN=${1:?'Must provide github token'} | ||
|
||
echo "machine github.com login $GITHUB_TOKEN password x-oauth-basic" >> ~/.netrc | ||
chmod 0600 ~/.netrc |