Update to latest SplitPackages version (#230)
React to aspnet/BuildTools#273
This commit is contained in:
Родитель
278b3e8d6d
Коммит
75aa01d53c
14
build.ps1
14
build.ps1
|
@ -1,6 +1,6 @@
|
|||
$ErrorActionPreference = "Stop"
|
||||
|
||||
function DownloadWithRetry([string] $url, [string] $downloadLocation, [int] $retries)
|
||||
function DownloadWithRetry([string] $url, [string] $downloadLocation, [int] $retries)
|
||||
{
|
||||
while($true)
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ function DownloadWithRetry([string] $url, [string] $downloadLocation, [int] $ret
|
|||
Start-Sleep -Seconds 10
|
||||
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
$exception = $_.Exception
|
||||
throw $exception
|
||||
|
@ -44,18 +44,18 @@ $buildFolder = ".build"
|
|||
$buildFile="$buildFolder\KoreBuild.ps1"
|
||||
|
||||
if (!(Test-Path $buildFolder)) {
|
||||
Write-Host "Downloading KoreBuild from $koreBuildZip"
|
||||
|
||||
Write-Host "Downloading KoreBuild from $koreBuildZip"
|
||||
|
||||
$tempFolder=$env:TEMP + "\KoreBuild-" + [guid]::NewGuid()
|
||||
New-Item -Path "$tempFolder" -Type directory | Out-Null
|
||||
|
||||
$localZipFile="$tempFolder\korebuild.zip"
|
||||
|
||||
|
||||
DownloadWithRetry -url $koreBuildZip -downloadLocation $localZipFile -retries 6
|
||||
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
[System.IO.Compression.ZipFile]::ExtractToDirectory($localZipFile, $tempFolder)
|
||||
|
||||
|
||||
New-Item -Path "$buildFolder" -Type directory | Out-Null
|
||||
copy-item "$tempFolder\**\build\*" $buildFolder -Recurse
|
||||
|
||||
|
@ -65,4 +65,4 @@ if (!(Test-Path $buildFolder)) {
|
|||
}
|
||||
}
|
||||
|
||||
&"$buildFile" $args
|
||||
&"$buildFile" @args
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<SplitPackagesVersion>1.0.2-rc2-15276</SplitPackagesVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="SplitPackages" Version="$(SplitPackagesVersion)" />
|
||||
<PackageReference Include="SplitPackages" Version="1.0.3-*" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
@ -4,17 +4,17 @@
|
|||
<NpmRegistry>$(NuGetPublishFeed)/npm/</NpmRegistry>
|
||||
<BuildDependsOn>$(BuildDependsOn);RunVerifier;RunSplitPackages;PublishNpmModules</BuildDependsOn>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<Target Name="RunVerifier">
|
||||
<Error Text="BUILD_SHARE not specified." Condition="'$(BUILD_SHARE)'==''" />
|
||||
|
||||
|
||||
<PropertyGroup>
|
||||
<BUILD_BRANCH Condition="'$(BUILD_BRANCH)'==''">dev</BUILD_BRANCH>
|
||||
<COHERENCE_UNIVERSECOHERENCE_BUILD_NUMBER Condition="'$(COHERENCE_UNIVERSECOHERENCE_BUILD_NUMBER)'==''">Latest</COHERENCE_UNIVERSECOHERENCE_BUILD_NUMBER>
|
||||
<COHERENCE_CORECLR_BUILD_NUMBER Condition="'$(COHERENCE_CORECLR_BUILD_NUMBER)'==''">Latest</COHERENCE_CORECLR_BUILD_NUMBER>
|
||||
<DISABLE_PARTNER_COHERENCE_CHECK Condition="'$(DISABLE_PARTNER_COHERENCE_CHECK)'==''">false</DISABLE_PARTNER_COHERENCE_CHECK>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<VerifierArgsList Include="
|
||||
--drop-folder "$(BUILD_SHARE) ";
|
||||
|
@ -22,7 +22,7 @@
|
|||
--output-path "$(ArtifactsDir) ";
|
||||
--universecoherence-build $(COHERENCE_UNIVERSECOHERENCE_BUILD_NUMBER);
|
||||
--coreclr-build $(COHERENCE_CORECLR_BUILD_NUMBER)"/>
|
||||
|
||||
|
||||
<VerifierArgsList Include="--disable-product-package-verification" Condition="'$(DISABLE_COHERENCE_CHECK)'=='true'"/>
|
||||
<VerifierArgsList Include="--disable-partner-package-verification" Condition="'$(DISABLE_PARTNER_COHERENCE_CHECK)'=='true'"/>
|
||||
</ItemGroup>
|
||||
|
@ -31,7 +31,7 @@
|
|||
<VerifierArgsList Include="--nuget-publish-feed $(NuGetPublishFeed)" />
|
||||
<VerifierArgsList Include="--api-key $(APIKEY)" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<PropertyGroup>
|
||||
<VerifierProjectDirectory>$(RepositoryRoot)tools\CoherenceBuild\</VerifierProjectDirectory>
|
||||
<VerifierArgs>@(VerifierArgsList, ' ')</VerifierArgs>
|
||||
|
@ -41,17 +41,13 @@
|
|||
</Target>
|
||||
|
||||
<Target Name="RunSplitPackages" DependsOnTargets="_FindDotNetPath">
|
||||
<PropertyGroup>
|
||||
<SplitPackagePath>$([MSBuild]::EnsureTrailingSlash('$(NuGetPackageRoot)'))splitpackages\$(SplitPackagesVersion)</SplitPackagePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ProductPackagesSource>$(ArtifactsDir)product-packages</ProductPackagesSource>
|
||||
<SplitPackagesCsv>$(RepositoryRoot)packages\packages.csv</SplitPackagesCsv>
|
||||
<SplitPackagesBinary>$(SplitPackagePath)\SplitPackages.dll</SplitPackagesBinary>
|
||||
<SplitPackagesArgs>--source $(ProductPackagesSource) --csv $(SplitPackagesCsv) --destination $(ArtifactsDir)</SplitPackagesArgs>
|
||||
</PropertyGroup>
|
||||
|
||||
<Exec Command=""$(DotNetPath)" "$(SplitPackagesBinary)" $(SplitPackagesArgs)" />
|
||||
<Exec Command=""$(DotNetPath)" "$(SplitPackagesNetCoreAppPath)" $(SplitPackagesArgs)" />
|
||||
|
||||
<RemoveDir Directories="$(ProductPackagesSource)" />
|
||||
</Target>
|
||||
|
@ -60,11 +56,11 @@
|
|||
<PropertyGroup>
|
||||
<AuthTokenSetting>$(NpmRegistry.Replace("https:", "")):_authToken</AuthTokenSetting>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<NpmModule Include="$(ArtifactsDir)build\*.tgz" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<Exec Command="npm config set "$(AuthTokenSetting)" $(APIKEY)" />
|
||||
<Exec Command="npm publish --registry $(NpmRegistry) "%(NpmModule.Identity)"" ContinueOnError="true">
|
||||
<Output TaskParameter="ExitCode" ItemName="ExitCodes" />
|
||||
|
@ -78,4 +74,4 @@
|
|||
<Output TaskParameter="ExecutablePath" PropertyName="DotNetPath" />
|
||||
</GetDotNetHost>
|
||||
</Target>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"SplitPackages": "1.0.1-*",
|
||||
"DependenciesPackager": "1.0.1-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"net451": { }
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче