Skip to content

Commit 1f83dd7

Browse files
authored
Add signing for .js files (#12749)
* Sign .js files.
1 parent 8d7668e commit 1f83dd7

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

Build/signing/SignFiles.proj

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="SignFiles" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="packages\Microsoft.VisualStudioEng.MicroBuild.Core.0.4.1\build\Microsoft.VisualStudioEng.MicroBuild.Core.props" />
4+
5+
<PropertyGroup>
6+
<BaseOutputDirectory>$(BUILD_STAGINGDIRECTORY)/Extension</BaseOutputDirectory>
7+
<!-- These properties are required by MicroBuild, which only signs files that are under these paths -->
8+
<IntermediateOutputPath>$(BaseOutputDirectory)</IntermediateOutputPath>
9+
<OutDir>$(BaseOutputDirectory)</OutDir>
10+
</PropertyGroup>
11+
12+
<ItemGroup>
13+
<!-- Because of Webpack bundling, these are the only shipping Javascript files.
14+
There are no third-party files to sign because they've all been bundled. -->
15+
<FilesToSign Include="$(OutDir)\dist\src\main.js;$(OutDir)\dist\ui\settings.js">
16+
<Authenticode>Microsoft400</Authenticode>
17+
</FilesToSign>
18+
</ItemGroup>
19+
20+
<Import Project="packages\Microsoft.VisualStudioEng.MicroBuild.Core.0.4.1\build\Microsoft.VisualStudioEng.MicroBuild.Core.targets" />
21+
</Project>

Build/signing/packages.config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="Microsoft.VisualStudioEng.MicroBuild.Core" version="0.4.1" developmentDependency="true" />
4+
</packages>

0 commit comments

Comments
 (0)