Generating a layout folder with the satellite assemblies only which we use to generate a language pack tarball/zip. Initially, I wanted a IncludeOnlyFilter, but couldn't quite get that to work on tar, just passing the filter in the command line didn't work because the shell does not do recursive globbing. So, I opted for the layout folder.

This commit is contained in:
Livar Cunha 2017-06-21 22:27:28 -07:00
parent 44d888dfc4
commit 126ec29fe2
3 changed files with 23 additions and 3 deletions

View file

@ -22,12 +22,14 @@
<ArtifactNameSdk>dotnet-sdk-internal</ArtifactNameSdk>
<ArtifactNameSdkDebug>dotnet-sdk-debug</ArtifactNameSdkDebug>
<ArtifactNameCombinedHostHostFxrFrameworkSdk>dotnet-sdk</ArtifactNameCombinedHostHostFxrFrameworkSdk>
<ArtifactNameSdkLanguagePack>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-langpack</ArtifactNameSdkLanguagePack>
<ArtifactNameWithVersionSdk>$(ArtifactNameSdk)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionSdk>
<ArtifactNameWithVersionSdkDebug>$(ArtifactNameSdkDebug)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionSdkDebug>
<ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>
<ArtifactNameWithVersionSdkLanguagePack>$(ArtifactNameSdkLanguagePack)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionSdkLanguagePack>
<DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-$(HostMonikerRid)</DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>
</PropertyGroup>
</Project>

View file

@ -14,7 +14,6 @@
<PropertyGroup>
<GenerateArchivesDestinationArchive>$(ArchiveOutputDirectory)/%(GenerateArchivesInputsOutputs.OutFileName)$(ArchiveExtension)</GenerateArchivesDestinationArchive>
<SatelliteAssemblies>*.resources.dll</SatelliteAssemblies>
</PropertyGroup>
<ZipFileCreateFromDirectory
@ -22,14 +21,14 @@
SourceDirectory="%(GenerateArchivesInputsOutputs.InputDirectory)"
DestinationArchive="$(GenerateArchivesDestinationArchive)"
OverwriteDestination="true"
ExcludePatterns="$(SatelliteAssemblies)" />
ExcludePatterns="%(GenerateArchivesInputsOutputs.ExcludePatterns)" />
<TarGzFileCreateFromDirectory
Condition=" '$(OSName)' != 'win' "
SourceDirectory="%(GenerateArchivesInputsOutputs.InputDirectory)"
DestinationArchive="$(GenerateArchivesDestinationArchive)"
OverwriteDestination="true"
ExcludePatterns="$(SatelliteAssemblies)" />
ExcludePatterns="%(GenerateArchivesInputsOutputs.ExcludePatterns)" />
<ItemGroup>
<Archives Include="$(GenerateArchivesDestinationArchive)" />
@ -45,6 +44,7 @@
<Outputs>$(ArchiveOutputDirectory)/%(LayoutDefinition.NameWithVersion)$(ArchiveExtension)</Outputs>
<InputDirectory>$(LayoutDirectory)/%(LayoutDefinition.Name)</InputDirectory>
<OutFileName>%(LayoutDefinition.NameWithVersion)</OutFileName>
<ExcludePatterns>%(LayoutDefinition.ExcludePatterns)</ExcludePatterns>
</GenerateArchivesInputsOutputs>
</ItemGroup>
</Target>

View file

@ -3,6 +3,9 @@
<PropertyGroup>
<SdkDebugLayoutOutputDirectory>$(LayoutDirectory)/$(ArtifactNameSdkDebug)</SdkDebugLayoutOutputDirectory>
<CombinedHostHostFxrFrameworkSdkOutputDirectory>$(LayoutDirectory)/$(ArtifactNameCombinedHostHostFxrFrameworkSdk)</CombinedHostHostFxrFrameworkSdkOutputDirectory>
<SdkLanguagePackOutputDirectory>$(LayoutDirectory)/$(ArtifactNameSdkLanguagePack)</SdkLanguagePackOutputDirectory>
<SatelliteAssemblies>*.resources.dll</SatelliteAssemblies>
<WindowsSatelliteAssembliesRegEx>.*.resources.dll</WindowsSatelliteAssembliesRegEx>
</PropertyGroup>
<Target DependsOnTargets="Init" Name="SetupLayoutInputsOutputs" >
@ -11,6 +14,7 @@
<SdkLayoutInput Include="$(OutputDirectory)/sdk/**/*" />
<SdkDebugLayoutInput Include="$(SymbolsDirectory)/sdk/**/*" />
<CombinedHostHostFxrFrameworkSdkInput Include="$(OutputDirectory)/**/*" />
<SdkLanguagePackInput Include="$(OutputDirectory)/sdk/**/$(SatelliteAssemblies)" />
<AspNetRuntimeFilesInput Include="$(AspNetRuntimePackageStorePublishDirectory)/**/*" />
</ItemGroup>
@ -30,6 +34,11 @@
Path2="%(CombinedHostHostFxrFrameworkSdkInput.Identity)" >
<Output TaskParameter="RelativePath" ItemName="CombinedHostHostFxrFrameworkSdkRelativeOutputFiles" />
</MakeRelative>
<MakeRelative
Path1="$(OutputDirectory)/"
Path2="%(SdkLanguagePackInput.Identity)" >
<Output TaskParameter="RelativePath" ItemName="SdkLanguagePackRelativeOutputFiles" />
</MakeRelative>
<!-- Set up Items Defining Layouts for easy change -->
<ItemGroup>
@ -52,6 +61,15 @@
<OutputFiles>@(CombinedHostHostFxrFrameworkSdkRelativeOutputFiles -> '$(CombinedHostHostFxrFrameworkSdkOutputDirectory)/%(Identity)')</OutputFiles>
<NameWithVersion>$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)</NameWithVersion>
<Name>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)</Name>
<ExcludePatterns Condition=" '$(OSName)' == 'win' ">$(WindowsSatelliteAssembliesRegEx)</ExcludePatterns>
<ExcludePatterns Condition=" '$(OSName)' != 'win' ">$(SatelliteAssemblies)</ExcludePatterns>
</LayoutDefinition>
<LayoutDefinition Include="SdkLanguagePack">
<InputFiles>@(SdkLanguagePackInput)</InputFiles>
<OutputFiles>@(SdkLanguagePackRelativeOutputFiles -> '$(SdkLanguagePackOutputDirectory)/%(Identity)')</OutputFiles>
<NameWithVersion>$(ArtifactNameWithVersionSdkLanguagePack)</NameWithVersion>
<Name>$(ArtifactNameSdkLanguagePack)</Name>
</LayoutDefinition>
</ItemGroup>