Update to latest SplitPackages version (#230)

React to aspnet/BuildTools#273
This commit is contained in:
Nate McMaster 2017-06-15 14:21:04 -07:00 коммит произвёл GitHub
Родитель 278b3e8d6d
Коммит 75aa01d53c
4 изменённых файлов: 18 добавлений и 34 удалений

Просмотреть файл

@ -1,6 +1,6 @@
$ErrorActionPreference = "Stop" $ErrorActionPreference = "Stop"
function DownloadWithRetry([string] $url, [string] $downloadLocation, [int] $retries) function DownloadWithRetry([string] $url, [string] $downloadLocation, [int] $retries)
{ {
while($true) while($true)
{ {
@ -19,7 +19,7 @@ function DownloadWithRetry([string] $url, [string] $downloadLocation, [int] $ret
Start-Sleep -Seconds 10 Start-Sleep -Seconds 10
} }
else else
{ {
$exception = $_.Exception $exception = $_.Exception
throw $exception throw $exception
@ -44,18 +44,18 @@ $buildFolder = ".build"
$buildFile="$buildFolder\KoreBuild.ps1" $buildFile="$buildFolder\KoreBuild.ps1"
if (!(Test-Path $buildFolder)) { if (!(Test-Path $buildFolder)) {
Write-Host "Downloading KoreBuild from $koreBuildZip" Write-Host "Downloading KoreBuild from $koreBuildZip"
$tempFolder=$env:TEMP + "\KoreBuild-" + [guid]::NewGuid() $tempFolder=$env:TEMP + "\KoreBuild-" + [guid]::NewGuid()
New-Item -Path "$tempFolder" -Type directory | Out-Null New-Item -Path "$tempFolder" -Type directory | Out-Null
$localZipFile="$tempFolder\korebuild.zip" $localZipFile="$tempFolder\korebuild.zip"
DownloadWithRetry -url $koreBuildZip -downloadLocation $localZipFile -retries 6 DownloadWithRetry -url $koreBuildZip -downloadLocation $localZipFile -retries 6
Add-Type -AssemblyName System.IO.Compression.FileSystem Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::ExtractToDirectory($localZipFile, $tempFolder) [System.IO.Compression.ZipFile]::ExtractToDirectory($localZipFile, $tempFolder)
New-Item -Path "$buildFolder" -Type directory | Out-Null New-Item -Path "$buildFolder" -Type directory | Out-Null
copy-item "$tempFolder\**\build\*" $buildFolder -Recurse copy-item "$tempFolder\**\build\*" $buildFolder -Recurse
@ -65,4 +65,4 @@ if (!(Test-Path $buildFolder)) {
} }
} }
&"$buildFile" $args &"$buildFile" @args

Просмотреть файл

@ -1,8 +1,5 @@
<Project> <Project>
<PropertyGroup>
<SplitPackagesVersion>1.0.2-rc2-15276</SplitPackagesVersion>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="SplitPackages" Version="$(SplitPackagesVersion)" /> <PackageReference Include="SplitPackages" Version="1.0.3-*" />
</ItemGroup> </ItemGroup>
</Project> </Project>

Просмотреть файл

@ -4,17 +4,17 @@
<NpmRegistry>$(NuGetPublishFeed)/npm/</NpmRegistry> <NpmRegistry>$(NuGetPublishFeed)/npm/</NpmRegistry>
<BuildDependsOn>$(BuildDependsOn);RunVerifier;RunSplitPackages;PublishNpmModules</BuildDependsOn> <BuildDependsOn>$(BuildDependsOn);RunVerifier;RunSplitPackages;PublishNpmModules</BuildDependsOn>
</PropertyGroup> </PropertyGroup>
<Target Name="RunVerifier"> <Target Name="RunVerifier">
<Error Text="BUILD_SHARE not specified." Condition="'$(BUILD_SHARE)'==''" /> <Error Text="BUILD_SHARE not specified." Condition="'$(BUILD_SHARE)'==''" />
<PropertyGroup> <PropertyGroup>
<BUILD_BRANCH Condition="'$(BUILD_BRANCH)'==''">dev</BUILD_BRANCH> <BUILD_BRANCH Condition="'$(BUILD_BRANCH)'==''">dev</BUILD_BRANCH>
<COHERENCE_UNIVERSECOHERENCE_BUILD_NUMBER Condition="'$(COHERENCE_UNIVERSECOHERENCE_BUILD_NUMBER)'==''">Latest</COHERENCE_UNIVERSECOHERENCE_BUILD_NUMBER> <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> <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> <DISABLE_PARTNER_COHERENCE_CHECK Condition="'$(DISABLE_PARTNER_COHERENCE_CHECK)'==''">false</DISABLE_PARTNER_COHERENCE_CHECK>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<VerifierArgsList Include=" <VerifierArgsList Include="
--drop-folder &quot;$(BUILD_SHARE) &quot;; --drop-folder &quot;$(BUILD_SHARE) &quot;;
@ -22,7 +22,7 @@
--output-path &quot;$(ArtifactsDir) &quot;; --output-path &quot;$(ArtifactsDir) &quot;;
--universecoherence-build $(COHERENCE_UNIVERSECOHERENCE_BUILD_NUMBER); --universecoherence-build $(COHERENCE_UNIVERSECOHERENCE_BUILD_NUMBER);
--coreclr-build $(COHERENCE_CORECLR_BUILD_NUMBER)"/> --coreclr-build $(COHERENCE_CORECLR_BUILD_NUMBER)"/>
<VerifierArgsList Include="--disable-product-package-verification" Condition="'$(DISABLE_COHERENCE_CHECK)'=='true'"/> <VerifierArgsList Include="--disable-product-package-verification" Condition="'$(DISABLE_COHERENCE_CHECK)'=='true'"/>
<VerifierArgsList Include="--disable-partner-package-verification" Condition="'$(DISABLE_PARTNER_COHERENCE_CHECK)'=='true'"/> <VerifierArgsList Include="--disable-partner-package-verification" Condition="'$(DISABLE_PARTNER_COHERENCE_CHECK)'=='true'"/>
</ItemGroup> </ItemGroup>
@ -31,7 +31,7 @@
<VerifierArgsList Include="--nuget-publish-feed $(NuGetPublishFeed)" /> <VerifierArgsList Include="--nuget-publish-feed $(NuGetPublishFeed)" />
<VerifierArgsList Include="--api-key $(APIKEY)" /> <VerifierArgsList Include="--api-key $(APIKEY)" />
</ItemGroup> </ItemGroup>
<PropertyGroup> <PropertyGroup>
<VerifierProjectDirectory>$(RepositoryRoot)tools\CoherenceBuild\</VerifierProjectDirectory> <VerifierProjectDirectory>$(RepositoryRoot)tools\CoherenceBuild\</VerifierProjectDirectory>
<VerifierArgs>@(VerifierArgsList, ' ')</VerifierArgs> <VerifierArgs>@(VerifierArgsList, ' ')</VerifierArgs>
@ -41,17 +41,13 @@
</Target> </Target>
<Target Name="RunSplitPackages" DependsOnTargets="_FindDotNetPath"> <Target Name="RunSplitPackages" DependsOnTargets="_FindDotNetPath">
<PropertyGroup>
<SplitPackagePath>$([MSBuild]::EnsureTrailingSlash('$(NuGetPackageRoot)'))splitpackages\$(SplitPackagesVersion)</SplitPackagePath>
</PropertyGroup>
<PropertyGroup> <PropertyGroup>
<ProductPackagesSource>$(ArtifactsDir)product-packages</ProductPackagesSource> <ProductPackagesSource>$(ArtifactsDir)product-packages</ProductPackagesSource>
<SplitPackagesCsv>$(RepositoryRoot)packages\packages.csv</SplitPackagesCsv> <SplitPackagesCsv>$(RepositoryRoot)packages\packages.csv</SplitPackagesCsv>
<SplitPackagesBinary>$(SplitPackagePath)\SplitPackages.dll</SplitPackagesBinary>
<SplitPackagesArgs>--source $(ProductPackagesSource) --csv $(SplitPackagesCsv) --destination $(ArtifactsDir)</SplitPackagesArgs> <SplitPackagesArgs>--source $(ProductPackagesSource) --csv $(SplitPackagesCsv) --destination $(ArtifactsDir)</SplitPackagesArgs>
</PropertyGroup> </PropertyGroup>
<Exec Command="&quot;$(DotNetPath)&quot; &quot;$(SplitPackagesBinary)&quot; $(SplitPackagesArgs)" /> <Exec Command="&quot;$(DotNetPath)&quot; &quot;$(SplitPackagesNetCoreAppPath)&quot; $(SplitPackagesArgs)" />
<RemoveDir Directories="$(ProductPackagesSource)" /> <RemoveDir Directories="$(ProductPackagesSource)" />
</Target> </Target>
@ -60,11 +56,11 @@
<PropertyGroup> <PropertyGroup>
<AuthTokenSetting>$(NpmRegistry.Replace("https:", "")):_authToken</AuthTokenSetting> <AuthTokenSetting>$(NpmRegistry.Replace("https:", "")):_authToken</AuthTokenSetting>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<NpmModule Include="$(ArtifactsDir)build\*.tgz" /> <NpmModule Include="$(ArtifactsDir)build\*.tgz" />
</ItemGroup> </ItemGroup>
<Exec Command="npm config set &quot;$(AuthTokenSetting)&quot; $(APIKEY)" /> <Exec Command="npm config set &quot;$(AuthTokenSetting)&quot; $(APIKEY)" />
<Exec Command="npm publish --registry $(NpmRegistry) &quot;%(NpmModule.Identity)&quot;" ContinueOnError="true"> <Exec Command="npm publish --registry $(NpmRegistry) &quot;%(NpmModule.Identity)&quot;" ContinueOnError="true">
<Output TaskParameter="ExitCode" ItemName="ExitCodes" /> <Output TaskParameter="ExitCode" ItemName="ExitCodes" />
@ -78,4 +74,4 @@
<Output TaskParameter="ExecutablePath" PropertyName="DotNetPath" /> <Output TaskParameter="ExecutablePath" PropertyName="DotNetPath" />
</GetDotNetHost> </GetDotNetHost>
</Target> </Target>
</Project> </Project>

Просмотреть файл

@ -1,9 +0,0 @@
{
"dependencies": {
"SplitPackages": "1.0.1-*",
"DependenciesPackager": "1.0.1-*"
},
"frameworks": {
"net451": { }
}
}