Add retries for restores during LZMA generation

This commit is contained in:
John Luo 2018-06-21 15:52:34 -07:00
parent a7d70164be
commit a296fe4cdf
1 changed files with 48 additions and 0 deletions

View File

@ -44,6 +44,54 @@
<!-- Restore the target project -->
<MSBuild
ContinueOnError="true"
Projects="$(_WorkRoot)Archive.csproj"
Targets="Restore"
Properties="RestorePackagesPath=$(FallbackStagingDir);RuntimeFrameworkVersion=$(LZMAMicrosoftNETCoreApp21PackageVersion);DotNetRestoreSourcePropsPath=$(GeneratedFallbackRestoreSourcesPropsPath);DotNetBuildOffline=true;AspNetUniverseBuildOffline=true" />
<!-- Retry if restore failed -->
<PropertyGroup>
<RestorePassed>$(MSBuildLastTaskResult)</RestorePassed>
</PropertyGroup>
<Warning Text="Restore failed, retry #1." Condition="'$(RestorePassed)' == 'false'"/>
<MSBuild
ContinueOnError="true"
Condition="'$(RestorePassed)' == 'false'"
Projects="$(_WorkRoot)Archive.csproj"
Targets="Restore"
Properties="RestorePackagesPath=$(FallbackStagingDir);RuntimeFrameworkVersion=$(LZMAMicrosoftNETCoreApp21PackageVersion);DotNetRestoreSourcePropsPath=$(GeneratedFallbackRestoreSourcesPropsPath);DotNetBuildOffline=true;AspNetUniverseBuildOffline=true" />
<!-- Retry if restore failed -->
<PropertyGroup>
<RestorePassed>$(MSBuildLastTaskResult)</RestorePassed>
</PropertyGroup>
<Warning Text="Restore failed, retry #2." Condition="'$(RestorePassed)' == 'false'"/>
<MSBuild
ContinueOnError="true"
Condition="'$(RestorePassed)' == 'false'"
Projects="$(_WorkRoot)Archive.csproj"
Targets="Restore"
Properties="RestorePackagesPath=$(FallbackStagingDir);RuntimeFrameworkVersion=$(LZMAMicrosoftNETCoreApp21PackageVersion);DotNetRestoreSourcePropsPath=$(GeneratedFallbackRestoreSourcesPropsPath);DotNetBuildOffline=true;AspNetUniverseBuildOffline=true" />
<!-- Retry if restore failed -->
<PropertyGroup>
<RestorePassed>$(MSBuildLastTaskResult)</RestorePassed>
</PropertyGroup>
<Warning Text="Restore failed, retry #3." Condition="'$(RestorePassed)' == 'false'"/>
<MSBuild
ContinueOnError="true"
Condition="'$(RestorePassed)' == 'false'"
Projects="$(_WorkRoot)Archive.csproj"
Targets="Restore"
Properties="RestorePackagesPath=$(FallbackStagingDir);RuntimeFrameworkVersion=$(LZMAMicrosoftNETCoreApp21PackageVersion);DotNetRestoreSourcePropsPath=$(GeneratedFallbackRestoreSourcesPropsPath);DotNetBuildOffline=true;AspNetUniverseBuildOffline=true" />
<!-- Retry if restore failed -->
<PropertyGroup>
<RestorePassed>$(MSBuildLastTaskResult)</RestorePassed>
</PropertyGroup>
<Warning Text="Restore failed, retry #4." Condition="'$(RestorePassed)' == 'false'"/>
<MSBuild
Condition="'$(RestorePassed)' == 'false'"
Projects="$(_WorkRoot)Archive.csproj"
Targets="Restore"
Properties="RestorePackagesPath=$(FallbackStagingDir);RuntimeFrameworkVersion=$(LZMAMicrosoftNETCoreApp21PackageVersion);DotNetRestoreSourcePropsPath=$(GeneratedFallbackRestoreSourcesPropsPath);DotNetBuildOffline=true;AspNetUniverseBuildOffline=true" />