-
Couldn't load subscription status.
- Fork 713
Set up extension build and sign pipeline #11504
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
Changes from all commits
f0f1a7d
c4186d0
5740e21
24c7c40
17ee0bf
8006a85
05676ac
e87d402
b6ed70e
17a2d4a
671994f
106ed3a
fc2f4c1
131be2c
76a9e33
d6d73a3
13dfc8a
36c5577
e1cd165
4d1c4b5
33131d5
98110e7
ff14ebc
a85e80c
e178308
c929b66
5d72d08
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| <Project Sdk="Microsoft.Build.NoTargets"> | ||
| <PropertyGroup> | ||
| <TargetFramework>$(DefaultTargetFramework)</TargetFramework> | ||
| <ExtensionSrcDir>$(MSBuildThisFileDirectory)</ExtensionSrcDir> | ||
| </PropertyGroup> | ||
|
|
||
| <Target Name="BuildAndPackageExtension" BeforeTargets="Build" DependsOnTargets="CheckYarnInstalled;CheckVsceInstalled"> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For future PRs it would be useful to add Inputs/Outputs to the targets, so this can be skipped on incremental builds. It would be useful if you are doing it locally. |
||
| <PropertyGroup> | ||
| <_PackageJsonPath>$([MSBuild]::NormalizePath($(ExtensionSrcDir), 'package.json'))</_PackageJsonPath> | ||
| <_VsixPath>$([MSBuild]::NormalizePath($(ArtifactsPackagesDir), 'aspire-vscode-$(Version).vsix'))</_VsixPath> | ||
| </PropertyGroup> | ||
|
|
||
| <Error Text="$(_PackageJsonPath) not found. Cannot package the extension." Condition="!Exists('$(_PackageJsonPath)')" /> | ||
|
|
||
| <!-- Extract version from package.json using Node.js --> | ||
| <Exec Command="node -p "require('./package.json').version"" | ||
| ConsoleToMSBuild="true" | ||
| IgnoreStandardErrorWarningFormat="true" | ||
| WorkingDirectory="$(ExtensionSrcDir)"> | ||
| <Output TaskParameter="ConsoleOutput" PropertyName="_ExtractedVersion" /> | ||
| </Exec> | ||
|
|
||
| <!-- Install dependencies and compile --> | ||
| <Exec Command="yarn install" WorkingDirectory="$(ExtensionSrcDir)" IgnoreStandardErrorWarningFormat="true" /> | ||
| <Exec Command="yarn compile" WorkingDirectory="$(ExtensionSrcDir)" IgnoreStandardErrorWarningFormat="true" /> | ||
|
|
||
| <!-- Make extension directory --> | ||
| <MakeDir Directories="$(ArtifactsPackagesDir)\vscode" /> | ||
|
|
||
| <!-- Package extension --> | ||
| <Exec Command="vsce package --pre-release --out $(ArtifactsPackagesDir)\vscode\aspire-vscode-$(_ExtractedVersion).vsix" | ||
| IgnoreStandardErrorWarningFormat="true" | ||
| WorkingDirectory="$(ExtensionSrcDir)" /> | ||
| </Target> | ||
|
|
||
| <Target Name="CheckYarnInstalled"> | ||
| <Exec Command="yarn --version" ContinueOnError="true" ConsoleToMSBuild="true" IgnoreStandardErrorWarningFormat="true"> | ||
| <Output TaskParameter="ExitCode" PropertyName="YarnExitCode" /> | ||
| <Output TaskParameter="ConsoleOutput" PropertyName="YarnVersion" /> | ||
| </Exec> | ||
|
|
||
| <Error Condition="'$(YarnExitCode)' != '0'" Text="yarn is not installed or not available in PATH. To build the extension, install yarn: https://yarnpkg.com/getting-started/install" /> | ||
|
|
||
| <Message Importance="high" Text="yarn version: $(YarnVersion)" /> | ||
| </Target> | ||
|
|
||
| <Target Name="CheckVsceInstalled"> | ||
| <Exec Command="vsce --version" ContinueOnError="true" ConsoleToMSBuild="true" IgnoreStandardErrorWarningFormat="true"> | ||
| <Output TaskParameter="ExitCode" PropertyName="VsceExitCode" /> | ||
| <Output TaskParameter="ConsoleOutput" PropertyName="VsceVersion" /> | ||
| </Exec> | ||
|
|
||
| <Error Condition="'$(VsceExitCode)' != '0'" Text="vsce is not installed or not available in PATH. To build the extension, install vsce: npm install -g vsce" /> | ||
|
|
||
| <Message Text="Found vsce version: $(VsceVersion)" /> | ||
| </Target> | ||
|
|
||
| </Project> | ||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file (and build.sh) shouldn't have been changed for this, as we shouldn't touch files under eng\common. Those get overwritten by arcade each time we update, so this shouldn't be modified, and instead we should change the files under eng\build.ps1/sh. Last night we took an arcade update which broke the build as these scripts where replaced.
cc: @adamint @radical
Fyi: @davidfowl who was asking about this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed that up in the update-arcade Pr.