Skip to content

Commit 8980716

Browse files
Merge pull request #390 from rabbitmq/rabbitmq-dotnet-client-154399066
Publish API docs to GitHub pages
2 parents c8f415f + 2097a85 commit 8980716

File tree

9 files changed

+120
-6
lines changed

9 files changed

+120
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
## Generated files
33
###################
44

5+
api/
56
gensrc/
67
[Ll]ocal.props
78
[Ll]ocal.dist

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[submodule "_site"]
2+
path = _site
3+
url = https://github.com/rabbitmq/rabbitmq-dotnet-client.git
4+
branch = gh-pages

APIDOCS.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Updating API Documentation
2+
3+
Updating the content in the `_site` submodule (which is this repository's `gh-pages` branch) is a manual process that must be done on Windows (as of docfx `2.31`):
4+
5+
* `git submodule update --init` in this project
6+
* Run `docfx.exe` 2.31 or later
7+
* `cd _site` and commit all changes
8+
* `cd ..` and commit updated `_site` submodule

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ as archives.
2222

2323
* [Tutorials](http://www.rabbitmq.com/getstarted.html)
2424
* [Documentation guide](http://www.rabbitmq.com/dotnet.html)
25+
* [API Documentation](https://rabbitmq.github.io/rabbitmq-dotnet-client/index.html
2526

2627

2728
## Supported Platforms and .NET Releases

_site

Submodule _site added at 6d593b8

build.sh

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,23 @@
22

33
set -e
44

5-
SCRIPT=$0
6-
SCRIPT_DIR=$(cd $(dirname "$SCRIPT") && pwd)
5+
if command -v realpath >/dev/null 2>&1
6+
then
7+
readonly script_dir="$(dirname "$(realpath "$0")")"
8+
else
9+
readonly script_dir="$(cd "$(dirname "$0")" && pwd)"
10+
fi
711

812
dotnet restore ./RabbitMQDotNetClient.sln
9-
dotnet run -p $SCRIPT_DIR/projects/client/Apigen/Apigen.csproj --apiName:AMQP_0_9_1 $SCRIPT_DIR/docs/specs/amqp0-9-1.stripped.xml $SCRIPT_DIR/gensrc/autogenerated-api-0-9-1.cs
10-
# we have to use msbuild or else multi-targeting doesn't work
11-
msbuild $SCRIPT_DIR/projects/client/RabbitMQ.Client/RabbitMQ.Client.csproj
12-
dotnet build $SCRIPT_DIR/projects/client/Unit/Unit.csproj
13+
dotnet run -p "$script_dir/projects/client/Apigen/Apigen.csproj" --apiName:AMQP_0_9_1 \
14+
"$script_dir/docs/specs/amqp0-9-1.stripped.xml" \
15+
"$script_dir/gensrc/autogenerated-api-0-9-1.cs"
16+
17+
if command -v msbuild >/dev/null 2>&1
18+
then
19+
# we have to use msbuild or else multi-targeting doesn't work
20+
msbuild "$script_dir/projects/client/RabbitMQ.Client/RabbitMQ.Client.csproj"
21+
else
22+
dotnet msbuild "$script_dir/projects/client/RabbitMQ.Client/RabbitMQ.Client.csproj"
23+
fi
24+
dotnet build "$script_dir/projects/client/Unit/Unit.csproj"

docfx.json

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
{
2+
"metadata": [
3+
{
4+
"src": [
5+
{
6+
"files": [
7+
"projects/**.csproj"
8+
],
9+
"exclude": [
10+
"**/obj/**",
11+
"**/bin/**",
12+
"_site/**"
13+
]
14+
}
15+
],
16+
"dest": "api",
17+
"disableGitFeatures": false
18+
}
19+
],
20+
"build": {
21+
"content": [
22+
{
23+
"files": [
24+
"api/**.yml",
25+
"api/index.md"
26+
]
27+
},
28+
{
29+
"files": [
30+
"articles/**.md",
31+
"articles/**/toc.yml",
32+
"toc.yml",
33+
"*.md"
34+
],
35+
"exclude": [
36+
"obj/**",
37+
"_site/**"
38+
]
39+
}
40+
],
41+
"resource": [
42+
{
43+
"files": [
44+
"images/**"
45+
],
46+
"exclude": [
47+
"obj/**",
48+
"_site/**"
49+
]
50+
}
51+
],
52+
"overwrite": [
53+
{
54+
"files": [
55+
"apidoc/**.md"
56+
],
57+
"exclude": [
58+
"obj/**",
59+
"_site/**"
60+
]
61+
}
62+
],
63+
"dest": "_site",
64+
"globalMetadataFiles": [],
65+
"fileMetadataFiles": [],
66+
"template": [
67+
"default"
68+
],
69+
"postProcessors": [],
70+
"noLangKeyword": false,
71+
"keepFileLink": false,
72+
"cleanupCacheHistory": false,
73+
"disableGitFeatures": false
74+
}
75+
}

index.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# RabbitMQ .NET Client
2+
3+
Links:
4+
5+
* [RabbitMQ .NET Client](http://www.rabbitmq.com/dotnet.html)
6+
* [RabbitMQ .NET Client API Guide](http://www.rabbitmq.com/dotnet-api-guide.html)
7+
* [API Reference](api/RabbitMQ.Client.html)
8+
* [Tutorials](http://www.rabbitmq.com/tutorials/tutorial-one-dotnet.html)

toc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- name: Home
2+
href: index.md
3+
- name: API Documentation
4+
href: api/

0 commit comments

Comments
 (0)