Remove separate package-source-build project (#18750)
This commit is contained in:
parent
9dc1ce8ad0
commit
c557d5b91f
5 changed files with 64 additions and 74 deletions
|
@ -210,8 +210,8 @@
|
|||
-->
|
||||
<NoTargetsSdkOverride Include="Microsoft.Build.NoTargets" Group="NOTARGETS" Version="$(NoTargetsSdkVersion)" />
|
||||
<TraversalSdkOverride Include="Microsoft.Build.Traversal" Group="TRAVERSAL" Version="$(TraversalSdkVersion)" />
|
||||
<SourceBuiltSdkOverride Include="@(NoTargetsSdkOverride)" Condition="'$(DotNetBuildSourceOnly)' == 'true' and '$(RepositoryName)' != 'source-build-reference-packages' and '$(IsUtilityProject)' != 'true'" />
|
||||
<SourceBuiltSdkOverride Include="@(TraversalSdkOverride)" Condition="'$(DotNetBuildSourceOnly)' == 'true' and '$(RepositoryName)' != 'source-build-reference-packages' and '$(IsUtilityProject)' != 'true'" />
|
||||
<SourceBuiltSdkOverride Include="@(NoTargetsSdkOverride)" Condition="'$(DotNetBuildSourceOnly)' == 'true' and '$(RepositoryName)' != 'source-build-reference-packages'" />
|
||||
<SourceBuiltSdkOverride Include="@(TraversalSdkOverride)" Condition="'$(DotNetBuildSourceOnly)' == 'true' and '$(RepositoryName)' != 'source-build-reference-packages'" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- CLI internal version is statically set by us to a version that will never show up in the wild.
|
||||
|
|
|
@ -16,10 +16,6 @@
|
|||
<PropertyGroup>
|
||||
<BuildCommand Condition="'$(BuildCommand)' == '' and '$(IsUtilityProject)' != 'true'">$(BuildScript) $(BuildActions) $(BuildArgs)</BuildCommand>
|
||||
|
||||
<!-- The default PackageVersionPropsFlowType behavior (DependenciesOnly) triggers logic that looks for a
|
||||
Version.Details.xml file. Setting the type to AllPackages will skip that logic. -->
|
||||
<PackageVersionPropsFlowType Condition="'$(IsUtilityProject)' == 'true'">AllPackages</PackageVersionPropsFlowType>
|
||||
|
||||
<!-- MinimalConsoleLogOutput determines if the repository build should be logged to a separate file or directly to the console. -->
|
||||
<RepoConsoleLogFile>$(ArtifactsLogDir)$(RepositoryName).log</RepoConsoleLogFile>
|
||||
<MinimalConsoleLogOutput Condition="'$(MinimalConsoleLogOutput)' == '' and '$(ContinuousIntegrationBuild)' == 'true'">true</MinimalConsoleLogOutput>
|
||||
|
|
|
@ -15,8 +15,4 @@
|
|||
<RepositoryReference Include="scenario-tests" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(DotNetBuildSourceOnly)' == 'true'">
|
||||
<RepositoryReference Include="package-source-build" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Need to set to false to calculate RepositoryCommit. -->
|
||||
<EnableSourceControlManagerQueries>false</EnableSourceControlManagerQueries>
|
||||
|
||||
<!-- We need to extract the non-portable OS name from the non-portable RID and pass that to installer build script -->
|
||||
<OSNameOverride>$(TargetOS)</OSNameOverride>
|
||||
<OSNameOverride Condition="'$(PortableBuild)' != 'true'">$(TargetRid.Substring(0, $(TargetRid.IndexOf("-"))))</OSNameOverride>
|
||||
|
@ -81,4 +84,63 @@
|
|||
<EnvironmentVariables Include="CLIBUILD_SKIP_BUNDLEDDOTNETTOOLS=true" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="GetInputsOutputForCreatePrivateSourceBuiltArtifactsArchive"
|
||||
DependsOnTargets="DetermineSourceBuiltSdkVersion">
|
||||
<!-- Inputs: Packages to include in the tarball -->
|
||||
<ItemGroup>
|
||||
<ArtifactsPackageToBundle Include="$(ArtifactsShippingPackagesDir)**;
|
||||
$(ArtifactsNonShippingPackagesDir)**"
|
||||
Condition="!$([System.String]::Copy('%(Identity)').EndsWith('.symbols.nupkg'))" />
|
||||
<ReferencePackageToBundle Include="$(ReferencePackagesDir)**"
|
||||
Condition="!$([System.String]::Copy('%(Identity)').EndsWith('.symbols.nupkg'))" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Create a layout directory for the files that are to be included in the artifacts tarball. -->
|
||||
<SourceBuiltLayoutDir>$([MSBuild]::NormalizeDirectory('$(BaseIntermediateOutputPath)', 'artifacts-layout'))</SourceBuiltLayoutDir>
|
||||
|
||||
<!-- Outputs -->
|
||||
<SourceBuiltTarballName>$(ArtifactsAssetsDir)$(SourceBuiltArtifactsTarballName).$(SourceBuiltSdkVersion).$(TargetRid)$(ArchiveExtension)</SourceBuiltTarballName>
|
||||
<SourceBuiltVersionName>$(SourceBuiltLayoutDir).version</SourceBuiltVersionName>
|
||||
<AllPackageVersionsPropsName>$(SourceBuiltLayoutDir)PackageVersions.props</AllPackageVersionsPropsName>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
<!-- Create the SourceBuilt.Private.Artifacts archive when building source-only. -->
|
||||
<Target Name="CreatePrivateSourceBuiltArtifactsArchive"
|
||||
AfterTargets="Build"
|
||||
DependsOnTargets="GetInputsOutputForCreatePrivateSourceBuiltArtifactsArchive"
|
||||
Inputs="@(ArtifactsPackageToBundle);@(ReferencePackageToBundle)"
|
||||
Outputs="$(SourceBuiltTarballName);$(SourceBuiltVersionName);$(AllPackageVersionsPropsName)"
|
||||
Condition="'$(DotNetBuildSourceOnly)' == 'true'">
|
||||
<!-- Copy packages to layout directory. Since there are a large number of files,
|
||||
this will use symlinks instead of copying files to make this execute quickly. -->
|
||||
<Copy SourceFiles="@(ArtifactsPackageToBundle)"
|
||||
DestinationFolder="$(SourceBuiltLayoutDir)"
|
||||
UseSymbolicLinksIfPossible="true" />
|
||||
<Copy SourceFiles="@(ReferencePackageToBundle)"
|
||||
DestinationFolder="$(SourceBuiltLayoutDir)SourceBuildReferencePackages"
|
||||
UseSymbolicLinksIfPossible="true" />
|
||||
|
||||
<!-- Content of the .version file to include in the tarball -->
|
||||
<ItemGroup>
|
||||
<VersionFileContent Include="$(RepositoryCommit);$(SourceBuiltSdkVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<WriteLinesToFile File="$(SourceBuiltVersionName)"
|
||||
Lines="@(VersionFileContent)"
|
||||
Overwrite="true" />
|
||||
|
||||
<!-- Create a PackageVersions.props file that includes entries for all packages. -->
|
||||
<WritePackageVersionsProps NuGetPackages="@(ArtifactsPackageToBundle)"
|
||||
ExtraProperties="@(ExtraPackageVersionPropsPackageInfo)"
|
||||
VersionPropsFlowType="AllPackages"
|
||||
OutputPath="$(AllPackageVersionsPropsName)" />
|
||||
|
||||
<Exec Command="tar --numeric-owner -czhf $(SourceBuiltTarballName) $([System.IO.Path]::GetFileName('$(SourceBuiltVersionName)')) *"
|
||||
WorkingDirectory="$(SourceBuiltLayoutDir)" />
|
||||
|
||||
<Message Importance="High" Text="Packaged source-built artifacts to $(SourceBuiltTarballName)" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -1,64 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- This is a wrapper project that doesn't build anything. -->
|
||||
<IsUtilityProject>true</IsUtilityProject>
|
||||
<!-- Need to set to false to calculate RepositoryCommit. -->
|
||||
<EnableSourceControlManagerQueries>false</EnableSourceControlManagerQueries>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<RepositoryReference Include="installer" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="CustomRepoBuild"
|
||||
AfterTargets="RepoBuild"
|
||||
DependsOnTargets="CreateBuildInputProps;DetermineSourceBuiltSdkVersion">
|
||||
<PropertyGroup>
|
||||
<SourceBuiltTarballName>$(ArtifactsAssetsDir)$(SourceBuiltArtifactsTarballName).$(SourceBuiltSdkVersion).$(TargetRid)$(ArchiveExtension)</SourceBuiltTarballName>
|
||||
<SourceBuiltVersionFileName>.version</SourceBuiltVersionFileName>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Content of the .version file to include in the tarball -->
|
||||
<ItemGroup>
|
||||
<VersionFileContent Include="$(RepositoryCommit);$(SourceBuiltSdkVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<WriteLinesToFile
|
||||
File="$(BaseIntermediateOutputPath)$(SourceBuiltVersionFileName)"
|
||||
Lines="@(VersionFileContent)"
|
||||
Overwrite="true" />
|
||||
|
||||
<ItemGroup>
|
||||
<_AllRepoFiles Include="$(ArtifactsShippingPackagesDir)/**" />
|
||||
<_AllRepoFiles Include="$(ArtifactsNonShippingPackagesDir)/**" />
|
||||
<_ReferencePackageFiles Include="$(ReferencePackagesDir)**" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Create a layout directory for the files that are to be included in the artifacts tarball. Since there are a large number of files, this will use symlinks
|
||||
instead of copying files to make this execute quickly. -->
|
||||
<PropertyGroup>
|
||||
<_SourceBuiltLayoutDir>$([MSBuild]::NormalizeDirectory('$(BaseIntermediateOutputPath)', 'artifacts-layout'))</_SourceBuiltLayoutDir>
|
||||
<SourceBuildReferencePackagesDestinationDirName>SourceBuildReferencePackages</SourceBuildReferencePackagesDestinationDirName>
|
||||
</PropertyGroup>
|
||||
|
||||
<Copy SourceFiles="@(_AllRepoFiles)"
|
||||
DestinationFolder="$(_SourceBuiltLayoutDir)"
|
||||
UseSymbolicLinksIfPossible="true" />
|
||||
<Copy SourceFiles="$(BaseIntermediateOutputPath)$(SourceBuiltVersionFileName)"
|
||||
DestinationFolder="$(_SourceBuiltLayoutDir)"
|
||||
UseSymbolicLinksIfPossible="true" />
|
||||
<Copy SourceFiles="$(CurrentSourceBuiltPackageVersionPropsPath)"
|
||||
DestinationFiles="$(_SourceBuiltLayoutDir)PackageVersions.props"
|
||||
UseSymbolicLinksIfPossible="true" />
|
||||
<Copy SourceFiles="@(_ReferencePackageFiles)"
|
||||
DestinationFolder="$(_SourceBuiltLayoutDir)$(SourceBuildReferencePackagesDestinationDirName)"
|
||||
UseSymbolicLinksIfPossible="true" />
|
||||
|
||||
<Exec Command="tar --numeric-owner -czhf $(SourceBuiltTarballName) $(SourceBuiltVersionFileName) *"
|
||||
WorkingDirectory="$(_SourceBuiltLayoutDir)" />
|
||||
|
||||
<Message Importance="High" Text="Packaged source-built artifacts to $(SourceBuiltTarballName)" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
Loading…
Add table
Add a link
Reference in a new issue