Skip to content

Commit 6367bb1

Browse files
Add MCP server assets to build process (#17716)
Add MCP server assets to build process ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/Azure/bicep/pull/17716)
1 parent 9fc3624 commit 6367bb1

File tree

6 files changed

+19
-3
lines changed

6 files changed

+19
-3
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ jobs:
137137
run: |
138138
mkdir -p ./src/vscode-bicep-notice/inputs
139139
npm --prefix ./src/vscode-bicep list -a --json > ./src/vscode-bicep-notice/inputs/npm-list.json
140-
cp ./src/Bicep.LangServer/obj/project.assets.json ./src/vscode-bicep-notice/inputs/project.assets.json
140+
cp ./src/Bicep.LangServer/obj/project.assets.json ./src/vscode-bicep-notice/inputs/langserver.assets.json
141+
cp ./src/Bicep.McpServer/obj/project.assets.json ./src/vscode-bicep-notice/inputs/mcpserver.assets.json
141142
dotnet build --configuration Release ./src/vscode-bicep-notice/vscode-bicep-notice.proj
142143
143144
- name: Create VSIX

.github/workflows/update-notices.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ jobs:
4848
- name: Publish Language Server
4949
run: dotnet publish --configuration Release ./src/Bicep.LangServer/Bicep.LangServer.csproj
5050

51+
- name: Publish MCP Server
52+
run: dotnet publish --configuration Release ./src/Bicep.McpServer/Bicep.McpServer.csproj
53+
5154
# this command is not correct for releasing the binaries but is sufficient for the purposes of this job
5255
- name: Windows Installer prerequisites
5356
run: mkdir ./src/installer-win/bicep && copy ./src/Bicep.Cli/obj/project.assets.json ./src/installer-win/bicep/ && copy ./src/Bicep.Cli/bin/Release/net8.0/bicep.* ./src/installer-win/bicep/
@@ -62,7 +65,10 @@ jobs:
6265
run: dotnet build --configuration Release /p:RuntimeSuffix=win-x64 ./src/Bicep.Cli.Nuget/nuget.proj
6366

6467
- name: VSIX Notice prerequisites
65-
run: mkdir ./src/vscode-bicep-notice/inputs && copy ./src/Bicep.LangServer/obj/project.assets.json ./src/vscode-bicep-notice/inputs/
68+
run: |
69+
mkdir ./src/vscode-bicep-notice/inputs
70+
copy ./src/Bicep.LangServer/obj/project.assets.json ./src/vscode-bicep-notice/inputs/langserver.assets.json
71+
copy ./src/Bicep.McpServer/obj/project.assets.json ./src/vscode-bicep-notice/inputs/mcpserver.assets.json
6672
6773
- name: npm ci
6874
run: npm ci

src/Bicep.McpServer/Bicep.McpServer.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
<TargetFramework>net8.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
8+
<!-- generates a NOTICE file in the publish output using our custom targets -->
9+
<EnableNoticeInPublishOutput>true</EnableNoticeInPublishOutput>
810
</PropertyGroup>
911

1012
<ItemGroup>

src/Bicep.McpServer/local-tpn.txt

Whitespace-only changes.

src/Bicep.McpServer/packages.lock.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
"version": 1,
33
"dependencies": {
44
"net8.0": {
5+
"Azure.Deployments.Internal.GenerateNotice": {
6+
"type": "Direct",
7+
"requested": "[0.1.45, )",
8+
"resolved": "0.1.45",
9+
"contentHash": "q2beLPQVvqyTU0hzQrW1b9rO0nlOiTN18c5xpr/HycmGdLXfaFleayi9gDAzGQHD5cOnrLISlwyUxJIa4HC+fQ=="
10+
},
511
"Microsoft.CodeAnalysis.BannedApiAnalyzers": {
612
"type": "Direct",
713
"requested": "[3.3.4, )",

src/vscode-bicep-notice/vscode-bicep-notice.proj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525

2626
<Target Name="PrepareForNoticeGeneration" BeforeTargets="GenerateNotice">
2727
<ItemGroup>
28-
<GenerateNoticeAssetFile Include="$(MSBuildProjectDirectory)\inputs\project.assets.json" />
28+
<GenerateNoticeAssetFile Include="$(MSBuildProjectDirectory)\inputs\langserver.assets.json" />
29+
<GenerateNoticeAssetFile Include="$(MSBuildProjectDirectory)\inputs\mcpserver.assets.json" />
2930
<GenerateNoticeNpmListJsonFile Include="$(MSBuildProjectDirectory)\inputs\npm-list.json" />
3031
</ItemGroup>
3132
<PropertyGroup>

0 commit comments

Comments
 (0)