Publish all things Razor.VSCode

- Publishing the Razor.VSCode NPM package for O#.
- Publishing the various Razor LanguageServers that are used by O#.

aspnet/AspNetCore#13494
This commit is contained in:
N. Taylor Mullen 2019-09-23 15:11:16 -07:00
Родитель bd71bcf87b
Коммит 0a3d37890a
4 изменённых файлов: 59 добавлений и 1 удалений

Просмотреть файл

@ -7,6 +7,7 @@
</PropertyGroup>
<Import Project="eng\MPack.targets" />
<Import Project="eng\targets\Packaging.targets" />
<Import Project="eng\targets\Npm.Common.targets" Condition="'$(MSBuildProjectExtension)' == '.npmproj'" />
<!-- Workaround https://github.com/dotnet/cli/issues/10528 -->

Просмотреть файл

@ -12,7 +12,9 @@ variables:
- name: _PublishUsingPipelines
value: true
- name: _DotNetArtifactsCategory
value: ASPNETCORETOOLING
value: .NETCORE
- name: _DotNetValidationArtifactsCategory
value: .NETCORE
trigger:
batch: true
@ -296,3 +298,4 @@ stages:
parameters:
# See https://github.com/dotnet/arcade/issues/2871
enableSymbolValidation: false
publishInstallersAndChecksums: true

40
eng/Publishing.props Normal file
Просмотреть файл

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<!-- The one use of ArtifactsDir in Publish.proj adds an additional slash, confusing itself. -->
<ArtifactsDir Condition=" HasTrailingSlash('$(ArtifactsDir)') ">$(ArtifactsDir.Substring(0, $([MSBuild]::Subtract($(ArtifactsDir.Length), 1))))</ArtifactsDir>
<PublishDependsOnTargets>$(PublishDependsOnTargets);_PublishingBlobItems</PublishDependsOnTargets>
<_UploadPathRoot>aspnetcore-tooling</_UploadPathRoot>
</PropertyGroup>
<!-- $(InstallersOutputPath) and $(SymbolsOutputPath) are not defined. Root Directory.Build.props is not imported. -->
<ItemGroup>
<!-- Prepare for _PublishingBlobItems target. -->
<_ItemsToPublish Include="$(ArtifactsDir)\packages\**\*.tgz" />
<_ItemsToPublish Include="$(ArtifactsDir)\LanguageServer\**\*.zip" />
</ItemGroup>
<Target Name="_PublishingBlobItems">
<!-- This target is defined in eng/targets/Packaging.targets and included in every C# and F# project. -->
<MSBuild Projects="$(RepoRoot)src\Razor\src\Microsoft.AspNetCore.Razor.Language.csproj"
Targets="_GetPackageVersionInfo"
SkipNonexistentProjects="false">
<Output TaskParameter="TargetOutputs" ItemName="_ResolvedPackageVersionInfo" />
</MSBuild>
<PropertyGroup>
<_PackageVersion>@(_ResolvedPackageVersionInfo->'%(PackageVersion)')</_PackageVersion>
</PropertyGroup>
<ItemGroup>
<ItemsToPushToBlobFeed Include="@(_ItemsToPublish)">
<IsShipping>false</IsShipping>
<ManifestArtifactData>ShipInstaller=dotnetcli;NonShipping=true</ManifestArtifactData>
<PublishFlatContainer>true</PublishFlatContainer>
<RelativeBlobPath>$(_UploadPathRoot)/$(_PackageVersion)/%(Filename)%(Extension)</RelativeBlobPath>
</ItemsToPushToBlobFeed>
</ItemGroup>
</Target>
</Project>

Просмотреть файл

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<!-- This target is used to get the package versions of projects -->
<Target Name="_GetPackageVersionInfo" Returns="@(_ProjectPathWithVersion)">
<ItemGroup>
<_ProjectPathWithVersion Include="$(MSBuildProjectFullPath)">
<PackageId>$(PackageId)</PackageId>
<PackageVersion>$(PackageVersion)</PackageVersion>
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
<VersionVariableName>$(PackageId.Replace('.',''))PackageVersion</VersionVariableName>
</_ProjectPathWithVersion>
</ItemGroup>
</Target>
</Project>