This repo generates and publishes documentation for azure repositories. It's currently in progress...
The project expects the collection of repos to be setup with repo init -u https://github.com/azure/ref-docs
.
git clone https://github.com/azure/ref-docs
npm install
gulp --tasks # to see all of the tasks
gulp build # to build the dist directory
- etc... read the gulpfile
*Note: update default.xml in this repo to reflect correct release tags for each library. Since Documnt DB is still in the private repo their tag shouldbe updated in the gulpfile.js
In PowerShell
- create a docker image using the Dockerfile in the root folder.
- create a docker container form that image
docker create -it <IMAGE_NAME>
docker container ls -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
40243faa06a1 picoded/ubuntu-openjdk-8-jdk "/bin/bash" 3 months ago Up 11 minutes gifted_pare
*Note: you can create container from the exisitng javadoc docker image docker create -it azureclidev.azurecr.io/azuresdk-javadoc
docker container start 40243faa06a1
then open a cmd
docker attach 40243faa06a1
export PATH=~/bin:$PATH
export JAVA_TOOL_OPTIONS='-Dfile.encoding=UTF8'
in the same cmd window configure env variables:
export GH_TOKEN=...
(put here github public access token without any quotes)git config --global user.email "..."
(your github user email e.g. [email protected])git config --global user.name "..."
(your github user id e.g. user)
*Note: github public access token needs to have access to private repo Azure/azure-documentdb-java-pr_
in the same cmd window build and publish java docs:
git clone https://github.com/Azure/ref-docs.git
cd ref-docs
npm install
manual fix requred here due to historical issue in the gh-pages branch. In node_modules/gift/lib/commit.js file change the method to this
Commit.actor = function(line) {
var actor, epoch, m, ref1;
ref1 = /^.+? (.*) (\d+) .*$/.exec(line);
if(ref1 !== undefined && ref1 !== null && ref1.length > 0) {
m = ref1[0], actor = ref1[1], epoch = ref1[2];
} else {
actor="..."; (your github user. e.g. User Muser <[email protected]>)
epoch="1518471247"; (magic number)
}
return [Actor.from_string(actor), new Date(1000 * +epoch)];
};
gulp publish