11#! /usr/bin/env bash
22# Generate the API reference Markdown under docs/api/.
33#
4- # Compiles every shipped MTConnect.NET library in Release / net8.0,
5- # then runs `docfx metadata` against the produced DLLs and XML doc
6- # files. The output is a flat tree of `Namespace.Type.md` pages
4+ # Compiles every committed MTConnect.NET project (libraries, agent and
5+ # adapter applications and modules, in-tree build / generator tools,
6+ # examples, the embedded-agent template, and the test suites) in
7+ # Debug, then runs `docfx metadata` against the produced DLLs and XML
8+ # doc files. The output is a flat tree of `Namespace.Type.md` pages
79# alongside per-namespace landing pages.
810#
911# Usage:
@@ -24,7 +26,7 @@ for arg in "$@"; do
2426 case " ${arg} " in
2527 --fast) skip_build=true ;;
2628 -h|--help)
27- sed -n ' 2,15p ' " ${BASH_SOURCE[0]} "
29+ sed -n ' 2,17p ' " ${BASH_SOURCE[0]} "
2830 exit 0
2931 ;;
3032 * )
@@ -34,30 +36,72 @@ for arg in "$@"; do
3436 esac
3537done
3638
37- libraries=(
38- " MTConnect.NET-Common"
39- " MTConnect.NET-DeviceFinder"
40- " MTConnect.NET-HTTP"
41- " MTConnect.NET-JSON"
42- " MTConnect.NET-JSON-cppagent"
43- " MTConnect.NET-MQTT"
44- " MTConnect.NET-Protobuf"
45- " MTConnect.NET-Services"
46- " MTConnect.NET-SHDR"
47- " MTConnect.NET-SysML"
48- " MTConnect.NET-TLS"
49- " MTConnect.NET-XML"
50- " MTConnect.NET"
39+ # Path to the project directory. The csproj filename is inferred as
40+ # "<basename>.csproj" except where overridden in the matching entries
41+ # of csproj_overrides below.
42+ projects=(
43+ " libraries/MTConnect.NET-Common"
44+ " libraries/MTConnect.NET-DeviceFinder"
45+ " libraries/MTConnect.NET-HTTP"
46+ " libraries/MTConnect.NET-JSON"
47+ " libraries/MTConnect.NET-JSON-cppagent"
48+ " libraries/MTConnect.NET-MQTT"
49+ " libraries/MTConnect.NET-Protobuf"
50+ " libraries/MTConnect.NET-Services"
51+ " libraries/MTConnect.NET-SHDR"
52+ " libraries/MTConnect.NET-SysML"
53+ " libraries/MTConnect.NET-TLS"
54+ " libraries/MTConnect.NET-XML"
55+ " libraries/MTConnect.NET"
56+ " agent/MTConnect.NET-Agent"
57+ " agent/MTConnect.NET-Applications-Agents"
58+ " agent/Modules/MTConnect.NET-AgentModule-HttpServer"
59+ " agent/Modules/MTConnect.NET-AgentModule-HttpAdapter"
60+ " agent/Modules/MTConnect.NET-AgentModule-MqttAdapter"
61+ " agent/Modules/MTConnect.NET-AgentModule-MqttBroker"
62+ " agent/Modules/MTConnect.NET-AgentModule-MqttRelay"
63+ " agent/Modules/MTConnect.NET-AgentModule-ShdrAdapter"
64+ " agent/Processors/MTConnect.NET-AgentProcessor-Python"
65+ " adapter/MTConnect.NET-Adapter"
66+ " adapter/MTConnect.NET-Applications-Adapter"
67+ " adapter/Modules/MTConnect.NET-AdapterModule-MQTT"
68+ " adapter/Modules/MTConnect.NET-AdapterModule-SHDR"
69+ " build/MTConnect.NET-SysML-Import"
70+ " build/MTConnect.NET-DocsGen"
71+ " build/MTConnect.NET.Builder"
72+ " examples/MTConnect.NET-Agent-Embedded"
73+ " examples/MTConnect.NET-Client-HTTP"
74+ " examples/MTConnect.NET-Client-MQTT"
75+ " examples/MTConnect.NET-Client-SHDR"
76+ " templates/mtconnect.net-agent/content/MTConnect.NET-Embedded-Agent:Agent.csproj"
77+ " tests/Compliance/MTConnect-Compliance-Tests"
78+ " tests/MTConnect.NET-AgentModule-MqttRelay-Tests"
79+ " tests/MTConnect.NET-Common-Tests"
80+ " tests/MTConnect.NET-Docs-Tests"
81+ " tests/MTConnect.NET-HTTP-Tests"
82+ " tests/MTConnect.NET-Integration-Tests"
83+ " tests/MTConnect.NET-JSON-cppagent-Tests"
84+ " tests/MTConnect.NET-JSON-Tests"
85+ " tests/MTConnect.NET-SHDR-Tests"
86+ " tests/MTConnect.NET-Tests-Agents"
87+ " tests/MTConnect.NET-XML-Tests"
5188)
5289
5390if ! " ${skip_build} " ; then
54- echo " ==> building libraries in Debug for net8.0"
55- # Debug is the multi-target config that compiles ONLY net8.0 on every
56- # project — Release multi-targets net4.6.1..net9.0 and fails on SDKs
57- # that lack the legacy reference assemblies. The reference is content,
58- # not packaged output, so a Debug build is fine.
59- for lib in " ${libraries[@]} " ; do
60- dotnet build " libraries/${lib} /${lib} .csproj" \
91+ echo " ==> building projects in Debug"
92+ # Debug is the multi-target config that compiles ONLY net8.0 on
93+ # every shipped project — Release multi-targets net4.6.1..net9.0 and
94+ # fails on SDKs that lack the legacy reference assemblies. The
95+ # reference is content, not packaged output, so a Debug build is
96+ # fine.
97+ for entry in " ${projects[@]} " ; do
98+ proj_dir=" ${entry%%:* } "
99+ if [[ " ${entry} " == * :* ]]; then
100+ csproj_name=" ${entry##*: } "
101+ else
102+ csproj_name=" $( basename " ${proj_dir} " ) .csproj"
103+ fi
104+ dotnet build " ${proj_dir} /${csproj_name} " \
61105 -c Debug \
62106 -p:GenerateDocumentationFile=true \
63107 -p:AdditionalNoWarn=CS1591 \
0 commit comments