Only produce one version of the runtime store, templates packages, and installers (#665)
This commit is contained in:
parent
728627e918
commit
dfd15c8679
|
|
@ -2,29 +2,12 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<_TemplatesDirectory>$(MSBuildThisFileDirectory)tools\templates\</_TemplatesDirectory>
|
<_TemplatesDirectory>$(MSBuildThisFileDirectory)tools\templates\</_TemplatesDirectory>
|
||||||
<_WorkRoot>$(RepositoryRoot).w\</_WorkRoot>
|
<_WorkRoot>$(RepositoryRoot).w\</_WorkRoot>
|
||||||
<TimestampSource>$(RepositoryRoot).deps\Signed\Packages\</TimestampSource>
|
<SignedPackagesSource>$(RepositoryRoot).deps\Signed\Packages\</SignedPackagesSource>
|
||||||
<TimestampFreeSource>$(RepositoryRoot).deps\Signed\Packages-NoTimeStamp\</TimestampFreeSource>
|
<LzmaOutputPackageName>nuGetPackagesArchive-$(PackageVersion)</LzmaOutputPackageName>
|
||||||
<TimestampOutputPackageName>nuGetPackagesArchive.timestamped</TimestampOutputPackageName>
|
|
||||||
<TimestampFreeOutputPackageName>nuGetPackagesArchive.notimestamp</TimestampFreeOutputPackageName>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<Target Name="BuildFallbackArchive">
|
<Target Name="BuildFallbackArchive" DependsOnTargets="ResolveRepoInfo">
|
||||||
<!-- Run the actual target twice, once for timestamped packages, once for non-timestamped packages -->
|
|
||||||
<!-- Here, we're re-invoking KoreBuild, but limiting it to a specific target. -->
|
|
||||||
<!-- This won't rerun the whole build, but it ensures that the necessary MSBuild Tasks and Properties are initialized -->
|
|
||||||
<MSBuild
|
|
||||||
Projects="$(MSBuildProjectFullPath)"
|
|
||||||
Targets="_BuildFallbackArchive"
|
|
||||||
Properties="MetapackageRestoreSource=$(TimestampSource);OutputPackageName=$(TimestampOutputPackageName);RemoveTimestamp=false;MetapackageVersion=$(PackageVersion)" />
|
|
||||||
<MSBuild
|
|
||||||
Projects="$(MSBuildProjectFullPath)"
|
|
||||||
Targets="_BuildFallbackArchive"
|
|
||||||
Properties="MetapackageRestoreSource=$(TimestampFreeSource);OutputPackageName=$(TimestampFreeOutputPackageName);RemoveTimestamp=true;MetapackageVersion=$(PackageVersionNoTimestamp)" />
|
|
||||||
</Target>
|
|
||||||
|
|
||||||
<Target Name="_BuildFallbackArchive" DependsOnTargets="ResolveRepoInfo">
|
|
||||||
<Error Text="MetapackageRestoreSource must be specified" Condition=" '$(MetapackageRestoreSource)' == '' " />
|
<Error Text="MetapackageRestoreSource must be specified" Condition=" '$(MetapackageRestoreSource)' == '' " />
|
||||||
<Error Text="OutputPackageName must be specified" Condition=" '$(OutputPackageName)' == '' " />
|
|
||||||
<Error Text="ArchiverPath must be specified" Condition=" '$(ArchiverPath)' == '' " />
|
<Error Text="ArchiverPath must be specified" Condition=" '$(ArchiverPath)' == '' " />
|
||||||
<Error Text="Archiver not found at $(ArchiverPath)" Condition="!Exists('$(ArchiverPath)')" />
|
<Error Text="Archiver not found at $(ArchiverPath)" Condition="!Exists('$(ArchiverPath)')" />
|
||||||
|
|
||||||
|
|
@ -40,14 +23,13 @@
|
||||||
BuildArtifacts="@(ArtifactInfo)"
|
BuildArtifacts="@(ArtifactInfo)"
|
||||||
PackageArtifacts="@(PackageArtifact)"
|
PackageArtifacts="@(PackageArtifact)"
|
||||||
ExternalDependencies="@(ExternalDependency)"
|
ExternalDependencies="@(ExternalDependency)"
|
||||||
RemoveTimestamp="$(RemoveTimestamp)"
|
|
||||||
MetapackageVersion="$(MetapackageVersion)" />
|
MetapackageVersion="$(MetapackageVersion)" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<FallbackStagingDir>$(_WorkRoot)obj\$(OutputPackageName)</FallbackStagingDir>
|
<FallbackStagingDir>$(_WorkRoot)obj\$(LzmaOutputPackageName)</FallbackStagingDir>
|
||||||
<FallbackOutputDir>$(ArtifactsDir)lzma\</FallbackOutputDir>
|
<FallbackOutputDir>$(ArtifactsDir)lzma\</FallbackOutputDir>
|
||||||
<FallbackOutputPath>$(FallbackOutputDir)$(OutputPackageName).lzma</FallbackOutputPath>
|
<FallbackOutputPath>$(FallbackOutputDir)$(LzmaOutputPackageName).lzma</FallbackOutputPath>
|
||||||
<GeneratedFallbackRestoreSourcesPropsPath>$(_WorkRoot)restoresources.$(OutputPackageName).props</GeneratedFallbackRestoreSourcesPropsPath>
|
<GeneratedFallbackRestoreSourcesPropsPath>$(_WorkRoot)restoresources.$(LzmaOutputPackageName).props</GeneratedFallbackRestoreSourcesPropsPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,9 @@
|
||||||
<!-- If there are duplicate properties, the properties which are defined later in the order would override the earlier ones -->
|
<!-- If there are duplicate properties, the properties which are defined later in the order would override the earlier ones -->
|
||||||
<RepositoryBuildArguments>$(RepositoryBuildArguments) /p:DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcesPropsPath)</RepositoryBuildArguments>
|
<RepositoryBuildArguments>$(RepositoryBuildArguments) /p:DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcesPropsPath)</RepositoryBuildArguments>
|
||||||
<RepositoryBuildArguments>$(RepositoryBuildArguments) /p:DotNetPackageVersionPropsPath=$(GeneratedPackageVersionPropsPath)</RepositoryBuildArguments>
|
<RepositoryBuildArguments>$(RepositoryBuildArguments) /p:DotNetPackageVersionPropsPath=$(GeneratedPackageVersionPropsPath)</RepositoryBuildArguments>
|
||||||
<RepositoryBuildArguments>$(RepositoryBuildArguments) /p:BuildNumber=$(BuildNumber) /p:Configuration=$(Configuration)</RepositoryBuildArguments>
|
<RepositoryBuildArguments>$(RepositoryBuildArguments) /p:BuildNumber=$(BuildNumber)</RepositoryBuildArguments>
|
||||||
|
<RepositoryBuildArguments>$(RepositoryBuildArguments) /p:Configuration=$(Configuration)</RepositoryBuildArguments>
|
||||||
|
<RepositoryBuildArguments>$(RepositoryBuildArguments) /p:IsFinalBuild=$(IsFinalBuild)</RepositoryBuildArguments>
|
||||||
<RepositoryBuildArguments>$(RepositoryBuildArguments) /noconsolelogger '/l:RepoTasks.FlowLogger,$(MSBuildThisFileDirectory)tasks\bin\publish\RepoTasks.dll;Summary;FlowId=$(RepositoryToBuild)'</RepositoryBuildArguments>
|
<RepositoryBuildArguments>$(RepositoryBuildArguments) /noconsolelogger '/l:RepoTasks.FlowLogger,$(MSBuildThisFileDirectory)tasks\bin\publish\RepoTasks.dll;Summary;FlowId=$(RepositoryToBuild)'</RepositoryBuildArguments>
|
||||||
|
|
||||||
<BuildArguments>$(_RepositoryBuildTargets) $(RepositoryBuildArguments)</BuildArguments>
|
<BuildArguments>$(_RepositoryBuildTargets) $(RepositoryBuildArguments)</BuildArguments>
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,7 @@
|
||||||
<_DockerDir>$(MSBuildThisFileDirectory)tools\docker\</_DockerDir>
|
<_DockerDir>$(MSBuildThisFileDirectory)tools\docker\</_DockerDir>
|
||||||
<_PackagingDir>$(MSBuildThisFileDirectory)tools\packaging\</_PackagingDir>
|
<_PackagingDir>$(MSBuildThisFileDirectory)tools\packaging\</_PackagingDir>
|
||||||
<_DebToolDir>$(MSBuildThisFileDirectory)tools\dotnet-deb-tool-consumer\</_DebToolDir>
|
<_DebToolDir>$(MSBuildThisFileDirectory)tools\dotnet-deb-tool-consumer\</_DebToolDir>
|
||||||
<_TimestampRSSource>$(RepositoryRoot).deps\Signed\Store\</_TimestampRSSource>
|
<_RuntimeStoreSource>$(RepositoryRoot).deps\Signed\Store\</_RuntimeStoreSource>
|
||||||
<_TimestampFreeRSSource>$(RepositoryRoot).deps\Signed\Store-TimestampFree\</_TimestampFreeRSSource>
|
|
||||||
<_InstallerSource>$(RepositoryRoot).deps\Installers\</_InstallerSource>
|
<_InstallerSource>$(RepositoryRoot).deps\Installers\</_InstallerSource>
|
||||||
<_WorkRoot>$(RepositoryRoot).w\</_WorkRoot>
|
<_WorkRoot>$(RepositoryRoot).w\</_WorkRoot>
|
||||||
<_WorkLayoutDir>$(_WorkRoot).l\</_WorkLayoutDir>
|
<_WorkLayoutDir>$(_WorkRoot).l\</_WorkLayoutDir>
|
||||||
|
|
@ -15,6 +14,7 @@
|
||||||
|
|
||||||
<RSInstallerName>aspnetcore-store</RSInstallerName>
|
<RSInstallerName>aspnetcore-store</RSInstallerName>
|
||||||
<HostingInstallerName>dotnet-hosting</HostingInstallerName>
|
<HostingInstallerName>dotnet-hosting</HostingInstallerName>
|
||||||
|
<HostingArchiveName>$(HostingInstallerName)-$(PackageVersion)-linux-x64.tar.gz</HostingArchiveName>
|
||||||
<RSDebConfigFile>$(_PackagingDir)store_debian_config.json</RSDebConfigFile>
|
<RSDebConfigFile>$(_PackagingDir)store_debian_config.json</RSDebConfigFile>
|
||||||
<HostingDebConfigFile>$(_PackagingDir)hosting_debian_config.json</HostingDebConfigFile>
|
<HostingDebConfigFile>$(_PackagingDir)hosting_debian_config.json</HostingDebConfigFile>
|
||||||
|
|
||||||
|
|
@ -24,9 +24,8 @@
|
||||||
|
|
||||||
<RuntimeStore200LinkPrefix>$(PublicCoreFeedPrefix)/aspnetcore/store/2.0.0-26452/Build.RS.</RuntimeStore200LinkPrefix>
|
<RuntimeStore200LinkPrefix>$(PublicCoreFeedPrefix)/aspnetcore/store/2.0.0-26452/Build.RS.</RuntimeStore200LinkPrefix>
|
||||||
<RuntimeTargzLink>$(CoreFeedPrefix)/Runtime/$(MicrosoftNETCoreApp20PackageVersion)/dotnet-runtime-$(MicrosoftNETCoreApp20PackageVersion)-linux-x64.tar.gz</RuntimeTargzLink>
|
<RuntimeTargzLink>$(CoreFeedPrefix)/Runtime/$(MicrosoftNETCoreApp20PackageVersion)/dotnet-runtime-$(MicrosoftNETCoreApp20PackageVersion)-linux-x64.tar.gz</RuntimeTargzLink>
|
||||||
<TimestampRSArchive>$(_TimestampRSSource)aspnetcore-store-$(PackageVersion)-linux-x64.tar.gz</TimestampRSArchive>
|
<RuntimeStoreArchivePrefix>$(_RuntimeStoreSource)aspnetcore-store-$(PackageVersion)-</RuntimeStoreArchivePrefix>
|
||||||
<TimestampFreeRSArchivePrefix>$(_TimestampFreeRSSource)aspnetcore-store-$(PackageVersionNoTimestamp)-</TimestampFreeRSArchivePrefix>
|
<RuntimeStoreLinuxArchiveFilePath>$(RuntimeStoreArchivePrefix)linux-x64.tar.gz</RuntimeStoreLinuxArchiveFilePath>
|
||||||
<TimestampFreeLinuxRSArchive>$(TimestampFreeRSArchivePrefix)linux-x64.tar.gz</TimestampFreeLinuxRSArchive>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<Target Name="BuildInstallers" DependsOnTargets="GenerateTargzs;GenerateRpms;GenerateDebs;GenerateRelabledInstallers" />
|
<Target Name="BuildInstallers" DependsOnTargets="GenerateTargzs;GenerateRpms;GenerateDebs;GenerateRelabledInstallers" />
|
||||||
|
|
@ -42,20 +41,8 @@
|
||||||
<Error Text="Docker host must be using Linux containers." Condition="'$(DockerHostOS)' != 'linux'"/>
|
<Error Text="Docker host must be using Linux containers." Condition="'$(DockerHostOS)' != 'linux'"/>
|
||||||
|
|
||||||
<Error
|
<Error
|
||||||
Text="Timestamp linux archive not found. Expected it to exist in $(TimestampRSArchive)."
|
Text="Linux archive not found. Expected it to exist in $(RuntimeStoreLinuxArchiveFilePath)."
|
||||||
Condition="!Exists('$(TimestampRSArchive)')" />
|
Condition="!Exists('$(RuntimeStoreLinuxArchiveFilePath)')" />
|
||||||
<Error
|
|
||||||
Text="Non-timestamp linux archive not found. Expected it to exist in $(TimestampFreeLinuxRSArchive)."
|
|
||||||
Condition="!Exists('$(TimestampFreeLinuxRSArchive)')" />
|
|
||||||
<Error
|
|
||||||
Text="Non-timestamp osx archive not found. Expected it to exist in $(TimestampFreeRSArchivePrefix)osx-x64.tar.gz."
|
|
||||||
Condition="!Exists('$(TimestampFreeRSArchivePrefix)osx-x64.tar.gz')" />
|
|
||||||
<Error
|
|
||||||
Text="Non-timestamp winx64 archive not found. Expected it to exist in $(TimestampFreeRSArchivePrefix)win7-x64.zip."
|
|
||||||
Condition="!Exists('$(TimestampFreeRSArchivePrefix)win7-x64.zip')" />
|
|
||||||
<Error
|
|
||||||
Text="Non-timestamp winx86 archive not found. Expected it to exist in $(TimestampFreeRSArchivePrefix)win7-x86.zip."
|
|
||||||
Condition="!Exists('$(TimestampFreeRSArchivePrefix)win7-x86.zip')" />
|
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="_EnsureInstallerDirectory" >
|
<Target Name="_EnsureInstallerDirectory" >
|
||||||
|
|
@ -121,22 +108,10 @@
|
||||||
<_DependentArchives Include="$(_InstallerSource)Build.RS.linux.tar.gz" />
|
<_DependentArchives Include="$(_InstallerSource)Build.RS.linux.tar.gz" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<DependentArchives>@(_DependentArchives)</DependentArchives>
|
|
||||||
<HostingArchiveName>$(HostingInstallerName)-$(Version)-linux-x64.tar.gz</HostingArchiveName>
|
|
||||||
<TimestampFreeHostingArchiveName>$(HostingInstallerName)-$(PackageVersionNoTimestamp)-linux-x64.tar.gz</TimestampFreeHostingArchiveName>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<!-- Timestamp hosting bundle -->
|
|
||||||
<MSBuild
|
<MSBuild
|
||||||
Projects="$(MSBuildProjectFullPath)"
|
Projects="$(MSBuildProjectFullPath)"
|
||||||
Targets="_GenerateTargz"
|
Targets="_GenerateTargz"
|
||||||
Properties="DependentArchives=$(DependentArchives);RSArchive=$(TimestampRSArchive);OutputArchiveName=$(HostingArchiveName)" />
|
Properties="DependentArchives=@(_DependentArchives);RSArchive=$(RuntimeStoreLinuxArchiveFilePath);OutputArchiveName=$(HostingArchiveName)" />
|
||||||
<!-- Timestamp free hosting bundle -->
|
|
||||||
<MSBuild
|
|
||||||
Projects="$(MSBuildProjectFullPath)"
|
|
||||||
Targets="_GenerateTargz"
|
|
||||||
Properties="DependentArchives=$(DependentArchives);RSArchive=$(TimestampFreeLinuxRSArchive);OutputArchiveName=$(TimestampFreeHostingArchiveName)" />
|
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="_DownloadAdditionalRSZips" DependsOnTargets="_EnsureInstallerDirectory;_DownloadInstallers">
|
<Target Name="_DownloadAdditionalRSZips" DependsOnTargets="_EnsureInstallerDirectory;_DownloadInstallers">
|
||||||
|
|
@ -150,16 +125,16 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<TargzArchives Include="Build.RS.linux.tar.gz">
|
<TargzArchives Include="Build.RS.linux.tar.gz">
|
||||||
<RSArchive>$(TimestampFreeRSArchivePrefix)linux-x64.tar.gz</RSArchive>
|
<RSArchive>$(RuntimeStoreArchivePrefix)linux-x64.tar.gz</RSArchive>
|
||||||
</TargzArchives>
|
</TargzArchives>
|
||||||
<TargzArchives Include="Build.RS.osx.tar.gz">
|
<TargzArchives Include="Build.RS.osx.tar.gz">
|
||||||
<RSArchive>$(TimestampFreeRSArchivePrefix)osx-x64.tar.gz</RSArchive>
|
<RSArchive>$(RuntimeStoreArchivePrefix)osx-x64.tar.gz</RSArchive>
|
||||||
</TargzArchives>
|
</TargzArchives>
|
||||||
<ZipArchives Include="Build.RS.winx64.zip">
|
<ZipArchives Include="Build.RS.winx64.zip">
|
||||||
<RSArchive>$(TimestampFreeRSArchivePrefix)win7-x64.zip</RSArchive>
|
<RSArchive>$(RuntimeStoreArchivePrefix)win7-x64.zip</RSArchive>
|
||||||
</ZipArchives>
|
</ZipArchives>
|
||||||
<ZipArchives Include="Build.RS.winx86.zip">
|
<ZipArchives Include="Build.RS.winx86.zip">
|
||||||
<RSArchive>$(TimestampFreeRSArchivePrefix)win7-x86.zip</RSArchive>
|
<RSArchive>$(RuntimeStoreArchivePrefix)win7-x86.zip</RSArchive>
|
||||||
</ZipArchives>
|
</ZipArchives>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
@ -313,17 +288,10 @@
|
||||||
<HostingDependencies Include="dotnet-runtime-$(MicrosoftNETCoreApp20PackageVersion)">
|
<HostingDependencies Include="dotnet-runtime-$(MicrosoftNETCoreApp20PackageVersion)">
|
||||||
<Version>$(MicrosoftNETCoreApp20PackageVersion)</Version>
|
<Version>$(MicrosoftNETCoreApp20PackageVersion)</Version>
|
||||||
</HostingDependencies>
|
</HostingDependencies>
|
||||||
<TimestampFreeHostingDependencies Include="$(RSInstallerName)-$(PackageVersionNoTimestamp)">
|
|
||||||
<Version>$(PackageVersionNoTimestamp)</Version>
|
|
||||||
</TimestampFreeHostingDependencies>
|
|
||||||
<TimestampFreeHostingDependencies Include="dotnet-runtime-$(MicrosoftNETCoreApp20PackageVersion)">
|
|
||||||
<Version>$(MicrosoftNETCoreApp20PackageVersion)</Version>
|
|
||||||
</TimestampFreeHostingDependencies>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<HostingFPMArguments>@(HostingDependencies->' -d "%(Identity) >= %(Version)"', ' ')</HostingFPMArguments>
|
<HostingFPMArguments>@(HostingDependencies->' -d "%(Identity) >= %(Version)"', ' ')</HostingFPMArguments>
|
||||||
<TimestampFreeHostingFPMArguments>@(TimestampFreeHostingDependencies->' -d "%(Identity) >= %(Version)"', ' ')</TimestampFreeHostingFPMArguments>
|
|
||||||
<RSDependencyArguments>@(RSDependencies->' -d "%(Identity) >= %(Version)"', ' ')</RSDependencyArguments>
|
<RSDependencyArguments>@(RSDependencies->' -d "%(Identity) >= %(Version)"', ' ')</RSDependencyArguments>
|
||||||
<RHRSArguments>$(RSDependencyArguments) @(RHStoreDirectories->' --directories "%(FullPath)"', ' ')</RHRSArguments>
|
<RHRSArguments>$(RSDependencyArguments) @(RHStoreDirectories->' --directories "%(FullPath)"', ' ')</RHRSArguments>
|
||||||
<GenericRSArguments>$(RSDependencyArguments) @(GenericStoreDirectories->' --directories "%(FullPath)"', ' ')</GenericRSArguments>
|
<GenericRSArguments>$(RSDependencyArguments) @(GenericStoreDirectories->' --directories "%(FullPath)"', ' ')</GenericRSArguments>
|
||||||
|
|
@ -342,48 +310,28 @@
|
||||||
<CommonHostingArguments>$(CommonHostingArguments);RPMSummary=@(_HostingSummary);RPMDescription=@(_HostingDescription)</CommonHostingArguments>
|
<CommonHostingArguments>$(CommonHostingArguments);RPMSummary=@(_HostingSummary);RPMDescription=@(_HostingDescription)</CommonHostingArguments>
|
||||||
<CommonHostingArguments>$(CommonHostingArguments);RPMLicense=@(_HostingLicense);RPMHomepage=@(_HostingHomepage)</CommonHostingArguments>
|
<CommonHostingArguments>$(CommonHostingArguments);RPMLicense=@(_HostingLicense);RPMHomepage=@(_HostingHomepage)</CommonHostingArguments>
|
||||||
|
|
||||||
<TimestampRSArguments>$(CommonArguments);$(CommonGenericArguments);$(CommonRSArguments)</TimestampRSArguments>
|
<RS_RPM_Arguments>$(CommonArguments);$(CommonGenericArguments);$(CommonRSArguments)</RS_RPM_Arguments>
|
||||||
<TimestampRSArguments>$(TimestampRSArguments);RSArchive=$(TimestampRSArchive);RPMVersion=$(PackageVersion);RPMArguments=$(GenericRSArguments)</TimestampRSArguments>
|
<RS_RPM_Arguments>$(RS_RPM_Arguments);RSArchive=$(RuntimeStoreLinuxArchiveFilePath);RPMVersion=$(PackageVersion);RPMArguments=$(GenericRSArguments)</RS_RPM_Arguments>
|
||||||
|
|
||||||
<TimestampFreeRSArguments>$(CommonArguments);$(CommonGenericArguments);$(CommonRSArguments)</TimestampFreeRSArguments>
|
<Hosting_RPM_RedHat_Arguments>$(CommonArguments);$(CommonGenericArguments);$(CommonHostingArguments)</Hosting_RPM_RedHat_Arguments>
|
||||||
<TimestampFreeRSArguments>$(TimestampFreeRSArguments);RSArchive=$(TimestampFreeLinuxRSArchive);RPMVersion=$(PackageVersionNoTimestamp);RPMArguments=$(GenericRSArguments)</TimestampFreeRSArguments>
|
<Hosting_RPM_RedHat_Arguments>$(Hosting_RPM_RedHat_Arguments);RPMVersion=$(PackageVersion);RPMArguments=$(HostingFPMArguments)</Hosting_RPM_RedHat_Arguments>
|
||||||
|
|
||||||
<TimestampHostingArguments>$(CommonArguments);$(CommonGenericArguments);$(CommonHostingArguments)</TimestampHostingArguments>
|
<RS_RPM_RedHat_Arguments>$(CommonArguments);$(CommonRHArguments);$(CommonRSArguments)</RS_RPM_RedHat_Arguments>
|
||||||
<TimestampHostingArguments>$(TimestampHostingArguments);RPMVersion=$(PackageVersion);RPMArguments=$(HostingFPMArguments)</TimestampHostingArguments>
|
<RS_RPM_RedHat_Arguments>$(RS_RPM_RedHat_Arguments);RSArchive=$(RuntimeStoreLinuxArchiveFilePath);RPMVersion=$(PackageVersion);RPMArguments=$(RHRSArguments)</RS_RPM_RedHat_Arguments>
|
||||||
|
|
||||||
<TimestampFreeHostingArguments>$(CommonArguments);$(CommonGenericArguments);$(CommonHostingArguments)</TimestampFreeHostingArguments>
|
<Hosting_RPM_Arguments>$(CommonArguments);$(CommonRHArguments);$(CommonHostingArguments)</Hosting_RPM_Arguments>
|
||||||
<TimestampFreeHostingArguments>$(TimestampFreeHostingArguments);RPMVersion=$(PackageVersionNoTimestamp);RPMArguments=$(TimestampFreeHostingFPMArguments)</TimestampFreeHostingArguments>
|
<Hosting_RPM_Arguments>$(Hosting_RPM_Arguments);RPMVersion=$(PackageVersion);RPMArguments=$(HostingFPMArguments)</Hosting_RPM_Arguments>
|
||||||
|
|
||||||
<RHTimestampRSArguments>$(CommonArguments);$(CommonRHArguments);$(CommonRSArguments)</RHTimestampRSArguments>
|
|
||||||
<RHTimestampRSArguments>$(RHTimestampRSArguments);RSArchive=$(TimestampRSArchive);RPMVersion=$(PackageVersion);RPMArguments=$(RHRSArguments)</RHTimestampRSArguments>
|
|
||||||
|
|
||||||
<RHTimestampFreeRSArguments>$(CommonArguments);$(CommonRHArguments);$(CommonRSArguments)</RHTimestampFreeRSArguments>
|
|
||||||
<RHTimestampFreeRSArguments>$(RHTimestampFreeRSArguments);RSArchive=$(TimestampFreeLinuxRSArchive);RPMVersion=$(PackageVersionNoTimestamp);RPMArguments=$(RHRSArguments)</RHTimestampFreeRSArguments>
|
|
||||||
|
|
||||||
<RHTimestampHostingArguments>$(CommonArguments);$(CommonRHArguments);$(CommonHostingArguments)</RHTimestampHostingArguments>
|
|
||||||
<RHTimestampHostingArguments>$(RHTimestampHostingArguments);RPMVersion=$(PackageVersion);RPMArguments=$(HostingFPMArguments)</RHTimestampHostingArguments>
|
|
||||||
|
|
||||||
<RHTimestampFreeHostingArguments>$(CommonArguments);$(CommonRHArguments);$(CommonHostingArguments)</RHTimestampFreeHostingArguments>
|
|
||||||
<RHTimestampFreeHostingArguments>$(RHTimestampFreeHostingArguments);RPMVersion=$(PackageVersionNoTimestamp);RPMArguments=$(TimestampFreeHostingFPMArguments)</RHTimestampFreeHostingArguments>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- General Timestamp runtime store -->
|
<!-- General runtime store -->
|
||||||
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateRpm" Properties="$(TimestampRSArguments)" />
|
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateRpm" Properties="$(RS_RPM_Arguments)" />
|
||||||
<!-- General Timestamp free runtime store -->
|
<!-- General hosting bundle -->
|
||||||
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateRpm" Properties="$(TimestampFreeRSArguments)" />
|
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateRpm" Properties="$(Hosting_RPM_RedHat_Arguments)" />
|
||||||
<!-- General Timestamp hosting bundle -->
|
|
||||||
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateRpm" Properties="$(TimestampHostingArguments)" />
|
|
||||||
<!-- General Timestamp free hosting bundle -->
|
|
||||||
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateRpm" Properties="$(TimestampFreeHostingArguments)" />
|
|
||||||
|
|
||||||
<!-- RH Timestamp runtime store -->
|
<!-- RH runtime store -->
|
||||||
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateRpm" Properties="$(RHTimestampRSArguments)" />
|
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateRpm" Properties="$(RS_RPM_RedHat_Arguments)" />
|
||||||
<!-- RH Timestamp free runtime store -->
|
<!-- RH hosting bundle -->
|
||||||
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateRpm" Properties="$(RHTimestampFreeRSArguments)" />
|
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateRpm" Properties="$(Hosting_RPM_Arguments)" />
|
||||||
<!-- RH Timestamp hosting bundle -->
|
|
||||||
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateRpm" Properties="$(RHTimestampHostingArguments)" />
|
|
||||||
<!-- RH Timestamp free hosting bundle -->
|
|
||||||
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateRpm" Properties="$(RHTimestampFreeHostingArguments)" />
|
|
||||||
|
|
||||||
<!-- Remove Docker Image to save disk space -->
|
<!-- Remove Docker Image to save disk space -->
|
||||||
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_RemoveDockerImage" Properties="Image=$(Image)" />
|
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_RemoveDockerImage" Properties="Image=$(Image)" />
|
||||||
|
|
@ -464,19 +412,11 @@
|
||||||
<MSBuild
|
<MSBuild
|
||||||
Projects="$(MSBuildProjectFullPath)"
|
Projects="$(MSBuildProjectFullPath)"
|
||||||
Targets="_GenerateDeb"
|
Targets="_GenerateDeb"
|
||||||
Properties="$(CommonRSArguments);RSArchive=$(TimestampRSArchive);DebVersion=$(Version)" />
|
Properties="$(CommonRSArguments);RSArchive=$(RuntimeStoreLinuxArchiveFilePath);DebVersion=$(Version)" />
|
||||||
<MSBuild
|
|
||||||
Projects="$(MSBuildProjectFullPath)"
|
|
||||||
Targets="_GenerateDeb"
|
|
||||||
Properties="$(CommonRSArguments);RSArchive=$(TimestampFreeLinuxRSArchive);DebVersion=$(PackageVersionNoTimestamp)" />
|
|
||||||
<MSBuild
|
<MSBuild
|
||||||
Projects="$(MSBuildProjectFullPath)"
|
Projects="$(MSBuildProjectFullPath)"
|
||||||
Targets="_GenerateDeb"
|
Targets="_GenerateDeb"
|
||||||
Properties="$(CommonHostingArguments);DebVersion=$(Version)" />
|
Properties="$(CommonHostingArguments);DebVersion=$(Version)" />
|
||||||
<MSBuild
|
|
||||||
Projects="$(MSBuildProjectFullPath)"
|
|
||||||
Targets="_GenerateDeb"
|
|
||||||
Properties="$(CommonHostingArguments);DebVersion=$(PackageVersionNoTimestamp)" />
|
|
||||||
|
|
||||||
<!-- Remove Docker Image to save disk space -->
|
<!-- Remove Docker Image to save disk space -->
|
||||||
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_RemoveDockerImage" Properties="Image=$(Image)" />
|
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_RemoveDockerImage" Properties="Image=$(Image)" />
|
||||||
|
|
@ -484,7 +424,7 @@
|
||||||
|
|
||||||
<Target Name="GenerateDebs" DependsOnTargets="_EnsureInstallerPrerequisites">
|
<Target Name="GenerateDebs" DependsOnTargets="_EnsureInstallerPrerequisites">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<CommonArguments>Version=$(Version);TimestampFreeVersion=$(PackageVersionNoTimestamp)</CommonArguments>
|
<CommonArguments>Version=$(Version)</CommonArguments>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateDebOnPlatform" Properties="$(CommonArguments);Image=debian.8" />
|
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateDebOnPlatform" Properties="$(CommonArguments);Image=debian.8" />
|
||||||
|
|
|
||||||
|
|
@ -5,26 +5,16 @@
|
||||||
|
|
||||||
<Target Name="BuildTemplates" DependsOnTargets="GeneratePropsFiles">
|
<Target Name="BuildTemplates" DependsOnTargets="GeneratePropsFiles">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<GeneratedNoTimestampPackageVersionPropsPath>$(IntermediateDir)dependencies.notimestamp.props</GeneratedNoTimestampPackageVersionPropsPath>
|
<TemplateProjProperties>
|
||||||
<TemplateProjCommmonProperties>
|
|
||||||
RepositoryRoot=$(TemplatingProjectRoot);
|
RepositoryRoot=$(TemplatingProjectRoot);
|
||||||
DotNetRestoreSourcesPropsPath=$(GeneratedRestoreSourcesPropsPath);
|
DotNetRestoreSourcesPropsPath=$(GeneratedRestoreSourcesPropsPath);
|
||||||
|
DotNetPackageVersionPropsPath=$(GeneratedPackageVersionPropsPath);
|
||||||
BuildNumber=$(BuildNumber);
|
BuildNumber=$(BuildNumber);
|
||||||
Configuration=$(Configuration);
|
Configuration=$(Configuration);
|
||||||
</TemplateProjCommmonProperties>
|
IsFinalBuild=$(IsFinalBuild);
|
||||||
<TemplateProjProperties>
|
|
||||||
$(TemplateProjCommmonProperties);
|
|
||||||
DotNetPackageVersionPropsPath=$(GeneratedPackageVersionPropsPath);
|
|
||||||
VersionMetadata=timestamped;
|
|
||||||
</TemplateProjProperties>
|
</TemplateProjProperties>
|
||||||
<TemplateProjNoTimestampProperties>
|
|
||||||
$(TemplateProjCommmonProperties);
|
|
||||||
DotNetPackageVersionPropsPath=$(GeneratedNoTimestampPackageVersionPropsPath);
|
|
||||||
IsFinalBuild=true;
|
|
||||||
</TemplateProjNoTimestampProperties>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- Produce regular, timestamped templates for pre-release builds -->
|
|
||||||
<MSBuild Projects="$(MSBuildProjectFullPath)"
|
<MSBuild Projects="$(MSBuildProjectFullPath)"
|
||||||
Targets="Restore;Compile;Package"
|
Targets="Restore;Compile;Package"
|
||||||
Properties="$(TemplateProjProperties)" />
|
Properties="$(TemplateProjProperties)" />
|
||||||
|
|
@ -34,35 +24,6 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Copy SourceFiles="@(TemplateArtifacts)" DestinationFolder="$(BuildDir)" />
|
<Copy SourceFiles="@(TemplateArtifacts)" DestinationFolder="$(BuildDir)" />
|
||||||
|
|
||||||
<!-- Gather artifact info as if this were a final build -->
|
|
||||||
<MSBuild Projects="$(MSBuildProjectFullPath)"
|
|
||||||
Targets="GetArtifactInfo"
|
|
||||||
Properties="RepositoryRoot=%(Repository.RootPath);Configuration=$(Configuration);BuildNumber=$(BuildNumber);IsFinalBuild=true"
|
|
||||||
ContinueOnError="WarnAndContinue">
|
|
||||||
<Output TaskParameter="TargetOutputs" ItemName="FinalBuildArtifactInfo" />
|
|
||||||
</MSBuild>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<_NoTimestampPackages Include="@(ExternalDependency)" />
|
|
||||||
<_NoTimestampPackages Include="%(FinalBuildArtifactInfo.PackageId)" Version="%(FinalBuildArtifactInfo.Version)" Condition=" '%(FinalBuildArtifactInfo.ArtifactType)' == 'NuGetPackage' " />
|
|
||||||
<_NoTimestampPackages Include="Microsoft.AspNetCore.All" Version="$(PackageVersionNoTimestamp)" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<GeneratePackageVersionPropsFile
|
|
||||||
Packages="@(_NoTimestampPackages)"
|
|
||||||
OutputPath="$(GeneratedNoTimestampPackageVersionPropsPath)" />
|
|
||||||
|
|
||||||
<!-- Rebuild the templates without restoring. (The non-timestamped packages don't exist yet.) -->
|
|
||||||
<MSBuild Projects="$(MSBuildProjectFullPath)"
|
|
||||||
Targets="Prepare;Compile;Package"
|
|
||||||
Properties="$(TemplateProjNoTimestampProperties);NoRestore=true" />
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<TemplateNoTimestampArtifacts Include="$(TemplatingProjectRoot)artifacts\build\*" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<Copy SourceFiles="@(TemplateNoTimestampArtifacts)" DestinationFolder="$(ArtifactsDir)notimestamp\" />
|
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
<SkipTests>false</SkipTests>
|
<SkipTests>false</SkipTests>
|
||||||
<SkipTests Condition="'$(CompileOnly)' == 'true'">true</SkipTests>
|
<SkipTests Condition="'$(CompileOnly)' == 'true'">true</SkipTests>
|
||||||
|
<IsFinalBuild Condition="'$(IsFinalBuild)' == ''">false</IsFinalBuild>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<Import Project="artifacts.props" />
|
<Import Project="artifacts.props" />
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,6 @@ namespace RepoTasks
|
||||||
[Required]
|
[Required]
|
||||||
public string MetaPackageVersion { get; set; }
|
public string MetaPackageVersion { get; set; }
|
||||||
|
|
||||||
[Required]
|
|
||||||
public bool RemoveTimestamp { get; set; }
|
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public ITaskItem[] BuildArtifacts { get; set; }
|
public ITaskItem[] BuildArtifacts { get; set; }
|
||||||
|
|
||||||
|
|
@ -61,11 +58,6 @@ namespace RepoTasks
|
||||||
.Single(p => string.Equals(p.PackageInfo.Id, packageName, StringComparison.OrdinalIgnoreCase))
|
.Single(p => string.Equals(p.PackageInfo.Id, packageName, StringComparison.OrdinalIgnoreCase))
|
||||||
.PackageInfo.Version.ToString();
|
.PackageInfo.Version.ToString();
|
||||||
|
|
||||||
if (RemoveTimestamp)
|
|
||||||
{
|
|
||||||
packageVersion = VersionUtilities.GetTimestampFreeVersion(packageVersion);
|
|
||||||
}
|
|
||||||
|
|
||||||
Log.LogMessage(MessageImportance.High, $" - Package: {packageName} Version: {packageVersion}");
|
Log.LogMessage(MessageImportance.High, $" - Package: {packageName} Version: {packageVersion}");
|
||||||
|
|
||||||
var packageReferenceElement = xmlDoc.CreateElement("PackageReference");
|
var packageReferenceElement = xmlDoc.CreateElement("PackageReference");
|
||||||
|
|
@ -95,11 +87,6 @@ namespace RepoTasks
|
||||||
.Single(p => string.Equals(p.PackageInfo.Id, packageName, StringComparison.OrdinalIgnoreCase))
|
.Single(p => string.Equals(p.PackageInfo.Id, packageName, StringComparison.OrdinalIgnoreCase))
|
||||||
.PackageInfo.Version.ToString();
|
.PackageInfo.Version.ToString();
|
||||||
|
|
||||||
if (RemoveTimestamp)
|
|
||||||
{
|
|
||||||
packageVersion = VersionUtilities.GetTimestampFreeVersion(packageVersion);
|
|
||||||
}
|
|
||||||
|
|
||||||
Log.LogMessage(MessageImportance.High, $" - Tool: {packageName} Version: {packageVersion}");
|
Log.LogMessage(MessageImportance.High, $" - Tool: {packageName} Version: {packageVersion}");
|
||||||
|
|
||||||
var packageReferenceElement = xmlDoc.CreateElement("DotNetCliToolReference");
|
var packageReferenceElement = xmlDoc.CreateElement("DotNetCliToolReference");
|
||||||
|
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
||||||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using NuGet.Versioning;
|
|
||||||
|
|
||||||
namespace RepoTasks.Utilities
|
|
||||||
{
|
|
||||||
public class VersionUtilities
|
|
||||||
{
|
|
||||||
public static string GetTimestampFreeVersion(string packageVersion)
|
|
||||||
{
|
|
||||||
var version = new NuGetVersion(packageVersion);
|
|
||||||
var updatedVersion = new NuGetVersion(version.Version, GetTimestampFreeReleaseLabel(version.Release));
|
|
||||||
return updatedVersion.ToNormalizedString();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetTimestampFreeReleaseLabel(string releaseLabel)
|
|
||||||
{
|
|
||||||
if (releaseLabel.StartsWith("rtm-", StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
|
||||||
// E.g. change version 2.5.0-rtm-123123 to 2.5.0.
|
|
||||||
releaseLabel = string.Empty;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var timeStampFreeVersion = Environment.GetEnvironmentVariable("TIMESTAMP_FREE_VERSION");
|
|
||||||
if (string.IsNullOrEmpty(timeStampFreeVersion))
|
|
||||||
{
|
|
||||||
timeStampFreeVersion = "final";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!timeStampFreeVersion.StartsWith("-"))
|
|
||||||
{
|
|
||||||
timeStampFreeVersion = "-" + timeStampFreeVersion;
|
|
||||||
}
|
|
||||||
|
|
||||||
// E.g. change version 2.5.0-rc2-123123 to 2.5.0-rc2-final.
|
|
||||||
var index = releaseLabel.LastIndexOf('-');
|
|
||||||
if (index != -1)
|
|
||||||
{
|
|
||||||
releaseLabel = releaseLabel.Substring(0, index) + timeStampFreeVersion;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return releaseLabel;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -3,9 +3,7 @@
|
||||||
<VersionPrefix>2.1.0</VersionPrefix>
|
<VersionPrefix>2.1.0</VersionPrefix>
|
||||||
<VersionSuffix>preview1</VersionSuffix>
|
<VersionSuffix>preview1</VersionSuffix>
|
||||||
<PackageVersion Condition="'$(IsFinalBuild)' == 'true' AND '$(VersionSuffix)' == 'rtm' ">$(VersionPrefix)</PackageVersion>
|
<PackageVersion Condition="'$(IsFinalBuild)' == 'true' AND '$(VersionSuffix)' == 'rtm' ">$(VersionPrefix)</PackageVersion>
|
||||||
<PackageVersionNoTimestamp Condition="'$(VersionSuffix)' == 'rtm' ">$(VersionPrefix)</PackageVersionNoTimestamp>
|
|
||||||
<PackageVersion Condition="'$(IsFinalBuild)' == 'true' AND '$(VersionSuffix)' != 'rtm' ">$(VersionPrefix)-$(VersionSuffix)-final</PackageVersion>
|
<PackageVersion Condition="'$(IsFinalBuild)' == 'true' AND '$(VersionSuffix)' != 'rtm' ">$(VersionPrefix)-$(VersionSuffix)-final</PackageVersion>
|
||||||
<PackageVersionNoTimestamp Condition="'$(VersionSuffix)' != 'rtm' ">$(VersionPrefix)-$(VersionSuffix)-final</PackageVersionNoTimestamp>
|
|
||||||
<VersionSuffix Condition="'$(VersionSuffix)' != '' And '$(BuildNumber)' != ''">$(VersionSuffix)-$(BuildNumber)</VersionSuffix>
|
<VersionSuffix Condition="'$(VersionSuffix)' != '' And '$(BuildNumber)' != ''">$(VersionSuffix)-$(BuildNumber)</VersionSuffix>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue