Add adl-vs to build and PR validation (#407)
This commit is contained in:
Родитель
6ac9e55d52
Коммит
9e082a5470
|
@ -7,11 +7,12 @@
|
|||
<StartAction>Program</StartAction>
|
||||
<StartProgram>$(DevEnvDir)devenv.exe</StartProgram>
|
||||
<StartArguments>/rootsuffix Exp</StartArguments>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="LICENSE" />
|
||||
<Content Include="adl.pkgdef" />
|
||||
<Content Include="../adl-vscode/dist/adl.tmLanguage" Link="TextMate/adl.tmLanguage" />
|
||||
<Content Include="node_modules/adl-vscode/dist/adl.tmLanguage" Link="TextMate/adl.tmLanguage" />
|
||||
<Content Update="@(Content)" IncludeInVSIX="true" CopyToOutputDirectory="PreserveNewest" />
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" />
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
# ADL Language Support for Visual Studio
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"name": "@azure-tools/adl-vs",
|
||||
"author": "Microsoft Corporation",
|
||||
"version": "0.1.0",
|
||||
"displayName": "ADL Language Support for Visual Studio",
|
||||
"description": "ADL Language Support for Visual Studio",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/azure/adl"
|
||||
},
|
||||
"files": [
|
||||
"bin/Release/Microsoft.Adl.VisualStudio.vsix"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "node scripts/build.js",
|
||||
"prepare": "npm run build"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"adl-vscode": "0.4.3"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
import { run } from "../../../eng/scripts/helpers.js";
|
||||
import { join } from "path";
|
||||
|
||||
if (process.platform !== "win32") {
|
||||
console.log("Skipping adl-vs build: not on Windows.");
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
const ignoreCommandNotFound = !process.env.ADL_REQUIRE_VISUAL_STUDIO_EXTENSION_BUILD;
|
||||
|
||||
const vswhere = join(
|
||||
process.env["ProgramFiles(x86)"],
|
||||
"Microsoft Visual Studio/Installer/vswhere.exe"
|
||||
);
|
||||
|
||||
const proc = run(vswhere, ["-latest", "-prerelease", "-property", "installationPath"], {
|
||||
ignoreCommandNotFound,
|
||||
encoding: "utf-8",
|
||||
stdio: [null, "pipe", "inherit"],
|
||||
});
|
||||
|
||||
if (ignoreCommandNotFound && proc.error?.code === "ENOENT") {
|
||||
console.log("Skipping adl-vs build: Visual Studio not found.");
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
const msbuild = join(proc.stdout.trim(), "MSBuild/Current/Bin/MSBuild.exe");
|
||||
run(msbuild, ["/p:Configuration=Release", "/nologo"]);
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"type": "module"
|
||||
}
|
Загрузка…
Ссылка в новой задаче