Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump docfx version #88

Merged
merged 1 commit into from
May 13, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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",
Copy link
Member Author

Choose a reason for hiding this comment

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

Needed for easier access to specific member pages.

"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
Copy link
Member Author

Choose a reason for hiding this comment

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

This will mark failed script as "Failed" (red) instead of "System Failure" (purple)

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
Copy link
Member Author

Choose a reason for hiding this comment

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

Irrelevant, as we run build-apidocs for each commit now.

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
Copy link
Member Author

Choose a reason for hiding this comment

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

Set priority for release-related tasks to prioritize package creation over regular tasks.

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