Skip to content

Commit

Permalink
Bump DocFx version to support latest language features (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanych-sun committed May 13, 2024
1 parent 30d4865 commit c40a672
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 26 deletions.
3 changes: 2 additions & 1 deletion apidocs/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"disableDefaultFilter": false,
"noRestore": false,
"namespaceLayout": "flattened",
"memberLayout": "samePage",
"memberLayout": "separatePages",
"EnumSortOrder": "declaringOrder",
"allowCompilationErrors": false
}
],
Expand Down
2 changes: 1 addition & 1 deletion evergreen/build-apidocs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ echo "Configure dotnet cli to use local manifest"
dotnet new tool-manifest --force

echo "Installing docfx tool"
dotnet tool install docfx --version "2.72.1" --local --verbosity q
dotnet tool install docfx --version "2.76.0" --local --verbosity q

echo "Building the api-docs"
dotnet tool run docfx metadata ./apidocs/docfx.json --property ProduceReferenceAssembly=true
Expand Down
60 changes: 36 additions & 24 deletions evergreen/evergreen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ functions:
pack-packages:
- command: shell.exec
type: test
params:
working_dir: mongo-efcore-provider
script: |
Expand All @@ -232,6 +233,7 @@ functions:
packages-smoke-tests:
- command: shell.exec
type: test
params:
working_dir: mongo-efcore-provider
script: |
Expand All @@ -244,6 +246,7 @@ functions:
push-packages:
- command: shell.exec
type: test
params:
working_dir: mongo-efcore-provider
env:
Expand Down Expand Up @@ -291,19 +294,17 @@ functions:

build-apidocs:
- command: shell.exec
type: test
params:
shell: bash
working_dir: mongo-efcore-provider
script: |
${PREPARE_SHELL}
if ! [[ "$PACKAGE_VERSION" =~ ^[0-9]+\.[0-9]+\.0$ ]]; then
echo "Skip api docs generating for the patch release"
exit 0
fi
./evergreen/build-apidocs.sh
upload-apidocs:
- command: shell.exec
type: test
params:
shell: bash
working_dir: mongo-efcore-provider
Expand All @@ -313,8 +314,8 @@ functions:
script: |
${PREPARE_SHELL}
if ! [[ "$PACKAGE_VERSION" =~ ^[0-9]+\.[0-9]+\.0$ ]]; then
echo "Skip api docs generating for the patch release"
exit 0
echo "Cannot upload api docs generating for the patch release"
exit 1
fi
./evergreen/upload-apidocs.sh
Expand Down Expand Up @@ -352,6 +353,10 @@ tasks:
PACKAGE_ID: "MongoDB.EntityFrameworkCore"
- func: packages-smoke-tests

- name: validate-apidocs
commands:
- func: build-apidocs

- name: generate-apidocs
commands:
- func: build-apidocs
Expand Down Expand Up @@ -461,8 +466,6 @@ buildvariants:
build-target: "tests"
display_name: "${target_runtime} ${driver} Driver on ${os} with ${version} Server"
tags: ["tests-variant"]
expansions:
BUILD_TARGET: "tests"
tasks:
- name: main-tests

Expand All @@ -475,11 +478,18 @@ buildvariants:
display_name: "${target_runtime} ${driver} Driver on Ubuntu-1804 with ${version} Server"
run_on: ubuntu1804-small
tags: ["tests-variant"]
expansions:
BUILD_TARGET: "tests"
tasks:
- name: main-tests

- matrix_name: validate-apidocs
matrix_spec:
build-target: "tests"
display_name: "Validate API Documentation generation"
run_on: ubuntu2004-small
tags: ["generate-apidocs", "tests-variant"]
tasks:
- name: validate-apidocs

- matrix_name: pack-packages
matrix_spec:
build-target: "release"
Expand All @@ -489,6 +499,7 @@ buildvariants:
tasks:
- name: pack-packages
git_tag_only: true
priority: 10

- matrix_name: test-packages
matrix_spec:
Expand All @@ -502,22 +513,24 @@ buildvariants:
tasks:
- name: packages-tests
git_tag_only: true
priority: 10
depends_on:
- name: pack-packages
variant: .pack-packages

#- matrix_name: generate-apidocs
# matrix_spec:
# build-target: "release"
# display_name: "Generate API Documentation"
# run_on: ubuntu2004-small
# tags: ["generate-apidocs", "release_tag"]
# tasks:
# - name: generate-apidocs
# git_tag_only: true
# depends_on:
# - name: packages-tests
# variant: .package-tests
- matrix_name: generate-apidocs
matrix_spec:
build-target: "release"
display_name: "Generate API Documentation"
run_on: ubuntu2004-small
tags: ["generate-apidocs", "release_tag"]
tasks:
- name: generate-apidocs
git_tag_only: true
priority: 10
depends_on:
- name: packages-tests
variant: .package-tests

- matrix_name: push-packages
matrix_spec:
Expand All @@ -528,10 +541,9 @@ buildvariants:
tasks:
- name: push-packages
git_tag_only: true
priority: 10
depends_on:
- name: pack-packages
variant: .pack-packages
- name: packages-tests
variant: .package-tests
# - name: generate-apidocs
# variant: .generate-apidocs

0 comments on commit c40a672

Please sign in to comment.