-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvements to documentation generation and test NuGet package updat…
…es (#95)
- Loading branch information
Showing
25 changed files
with
971 additions
and
907 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
|
||
readonly metadata_file_dir="api-docs" | ||
|
||
change_netstd2_uids() { | ||
local -r file_dir="$metadata_file_dir/netstd2" | ||
|
||
# Loop through all yaml files in the api-docs/netstd2 folder | ||
for file in $(find $file_dir -name "*.yml" -o -name "*.yaml"); do | ||
# Update the uid property to prefix with netstd2. | ||
sed -i "s|uid: |uid: netstd2.|g" $file | ||
|
||
# Update text that contains <xref href="Dapper. to <xref href="netstd2.Dapper. | ||
sed -i "s|<xref href=\"Dapper.SimpleSqlBuilder.|<xref href=\"netstd2.Dapper.SimpleSqlBuilder.|g" $file | ||
done | ||
} | ||
|
||
remove_extension_methods() { | ||
# Block of text to remove | ||
local -r pattern="- h4: Extension Methods" | ||
|
||
# Loop through all yaml files in the api-docs folder | ||
for file in $(find $metadata_file_dir -name "*.yml" -o -name "*.yaml"); do | ||
# Ignore file starts with toc | ||
if [[ $file == *"toc.yml"* ]] || [[ $file == *"toc.yaml"* ]]; then | ||
continue | ||
fi | ||
|
||
# Use sed to remove the block of text | ||
sed -i "/$pattern/,+3d" "$file" | ||
done | ||
} | ||
|
||
docfx metadata docfx.json | ||
change_netstd2_uids | ||
remove_extension_methods |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,36 @@ | ||
#!/bin/bash | ||
|
||
if [ -z "$1" ]; then | ||
echo "Error: Base URL not provided" >&2 | ||
exit 1 | ||
fi | ||
|
||
## Assign the first argument to base_url and remove trailing slash if present | ||
readonly base_url=${1%/} | ||
|
||
readonly gen_folder="_xref-gen" | ||
readonly file_path="xrefs" | ||
|
||
# Copy and update xrefmap files with base URL in href property. | ||
copy_and_update_xrefmap_files() { | ||
local -r files=("core.xrefmap.yml" "netstd2.xrefmap.yml") | ||
|
||
for file in "${files[@]}"; do | ||
# Copy file to xrefs folder | ||
cp -f "$gen_folder/$file" "$file_path" | ||
|
||
# Update href property in xrefmap file with base URL | ||
sed -i "/href: http/!s|href: |href: $base_url/|g" "$file_path/$file" | ||
|
||
# Update uid property in netstd2.xrefmap.yml to prefix with netstd2. | ||
if [ "$file" == "netstd2.xrefmap.yml" ]; then | ||
sed -i "s|uid: |uid: netstd2.|g" "$file_path/$file" | ||
fi | ||
done | ||
} | ||
|
||
docfx metadata docfx-xref.json | ||
docfx build docfx-xref.json | ||
cp -f _xref-gen/core.xrefmap.yml xrefs | ||
cp -f _xref-gen/netstd2.xrefmap.yml xrefs | ||
rm -r _xref-gen | ||
rm -r api-docs | ||
copy_and_update_xrefmap_files | ||
rm -r $gen_folder | ||
rm -r api-docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
docs/github-pages/docs/builders/fluent-builder/delete-builder.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
docs/github-pages/docs/builders/fluent-builder/fluent-builder.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
docs/github-pages/docs/builders/fluent-builder/insert-builder.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.