Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
all: serve

build:
mkdocs build

serve:
mkdocs serve

release:
./bin/release.sh

17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,35 @@ This hosts the documentation source and examples for [Bullet](https://github.com

The built documentation can be accessed [here](https://bullet-db.github.io).

## Building the documentation
## Installing mkdocs

You will need Python installed.

You can install the required tool "mkdocs" like this (a "mkdocs" directory will be created wherever you execute these commands):

```bash
sudo pip install virtualenv
virtualenv mkdocs
source mkdocs/bin/activate
pip install mkdocs==0.16.3
pip install mkdocs-cinder
pip install git+git://github.com/twardoch/clinker-mktheme.git@master --upgrade
git clone git@github.com:bullet-db/bullet-db.github.io.git
cd bullet-db.github.io
mkdocs serve
```

The above commands will install [mkdocs](http://www.mkdocs.org/#installation) along with the mkdocs theme : [Cinder](http://sourcefoundry.org/cinder/).

Since Cinder has not been upgraded in a while, it uses the changes in this [PR](https://github.com/chrissimpkins/cinder/pull/26) of Cinder found here: [twardoch/clinker-mktheme](https://github.com/twardoch/clinker-mktheme/tree/master).

## Building the Documentation

Once mkdocs is available:

`make build` will build the documentation.

`make serve` will serve the documentation so it can be viewed from a local browser.

`make release` will build a release and commit it to your local "master" branch. This command assumes you have a clean git environment ("git diff" prints nothing). It will build the documentation and commit it to your local master branch. **YOU must push the changes** in your master branch to the remote repo if you want to publish the changes after the command completes successfully.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It no longer commits

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does commit - just no longer pushes.


## Building the examples

You will need [Maven 3](https://maven.apache.org/install.html) and [JDK 8](http://www.oracle.com/technetwork/java/javase/downloads/index.html) installed to build the examples.
Expand Down
35 changes: 35 additions & 0 deletions bin/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/sh

# This script will build the documentation from the current "src" branch and push it to the "master" branch.
# "mkdocs" must be available, and you must be in a clean git environment ("git diff" should print nothing).

git checkout src
git pull
COMMIT=`git rev-parse HEAD | cut -c 1-7`
echo Building docs...
mkdocs build
if [ $? -ne 0 ]; then
echo ------------------ ERROR ------------------
echo mkdocs must be installed
echo see README.md for more info
echo -------------------------------------------
exit 1;
fi
set -e
rm -rf /tmp/tmp-folder-for-bullet-docs/
mkdir -p /tmp/tmp-folder-for-bullet-docs/
mv site/ /tmp/tmp-folder-for-bullet-docs/
echo Checking out master...
git checkout master
git pull
# Carefully delete everything in this folder
rm -rf ./*
cp -r /tmp/tmp-folder-for-bullet-docs/site/ ./
rm -rf /tmp/tmp-folder-for-bullet-docs/
git add -A
git commit -m "Build at ${COMMIT}"
echo ---------------- SUCCESS --------------------
echo The documentation has been built locally
echo You are on the **master** branch
echo DO "git push" TO PUSH CHANGES TO REMOTE REPO
echo ---------------------------------------------