Skip to content

Commit

Permalink
Update the artifacts directory organization and simplify publishing t…
Browse files Browse the repository at this point in the history
…argets (dotnet/aspnetcore#5701)

This simplifies the way that we publish files to our network drop share.

Changes:
* Instead of explicitly listing every file that needs to publish, use directories to classify packages and artifacts into different categories.
* Add documentation for the expected layout of artifacts/
* Remove the need for static analysis to determine which packages go to which project
* Add the MSBuild property "IsProductPackage" to .csproj files which ship as a package to NuGet.org.

Commit migrated from dotnet/aspnetcore@335c9be7b4a7
  • Loading branch information
natemcmaster authored Dec 18, 2018
1 parent 9f5b84a commit 1aa1628
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
9 changes: 9 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,13 @@
<PackageReference Include="Internal.AspNetCore.Sdk" PrivateAssets="All" Version="$(InternalAspNetCoreSdkPackageVersion)" />
</ItemGroup>

<!-- Artifacts layout -->
<PropertyGroup>
<ArtifactsDir>$(MSBuildThisFileDirectory)..\..\artifacts\</ArtifactsDir>
<ArtifactsConfigurationDir>$(ArtifactsDir)$(Configuration)\</ArtifactsConfigurationDir>
<BasePackageOutputPath>$(ArtifactsConfigurationDir)packages\</BasePackageOutputPath>
<ProductPackageOutputPath>$(BasePackageOutputPath)product\</ProductPackageOutputPath>
<InternalPackageOutputPath>$(BasePackageOutputPath)internal\</InternalPackageOutputPath>
</PropertyGroup>

</Project>
15 changes: 12 additions & 3 deletions src/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
<Project>
<PropertyGroup>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp3.0' ">$(MicrosoftNETCoreApp30PackageVersion)</RuntimeFrameworkVersion>
<NETStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netstandard2.0' ">$(NETStandardLibrary20PackageVersion)</NETStandardImplicitPackageVersion>
<!-- aspnet/BuildTools#662 Don't police what version of NetCoreApp we use -->
<NETCoreAppMaximumVersion>99.9</NETCoreAppMaximumVersion>
</PropertyGroup>

<PropertyGroup>
<!--
By default, all projects which produce packages are not intended to ship to NuGet.org as a product package.
Packages which are intended to ship to NuGet.org must opt-in by setting this to true in the project file.
-->
<IsProductPackage Condition=" '$(IsProductPackage)' == '' ">false</IsProductPackage>

<PackageOutputPath Condition=" '$(IsProductPackage)' == 'true' ">$(ProductPackageOutputPath)</PackageOutputPath>
<PackageOutputPath Condition=" '$(IsProductPackage)' != 'true' ">$(InternalPackageOutputPath)</PackageOutputPath>
</PropertyGroup>

</Project>
4 changes: 4 additions & 0 deletions src/build/repo.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<Project>
<Import Project="dependencies.props" />

<PropertyGroup>
<OverridePackageOutputPath>false</OverridePackageOutputPath>
</PropertyGroup>

<ItemGroup>
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp30PackageVersion)" />
</ItemGroup>
Expand Down

0 comments on commit 1aa1628

Please sign in to comment.