Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 98DE3200C88 for ; Fri, 2 Jun 2017 16:43:03 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 97EC4160BD2; Fri, 2 Jun 2017 14:43:03 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DDCD2160BD1 for ; Fri, 2 Jun 2017 16:43:02 +0200 (CEST) Received: (qmail 38739 invoked by uid 500); 2 Jun 2017 14:43:02 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 38730 invoked by uid 99); 2 Jun 2017 14:43:02 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Jun 2017 14:43:02 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 06CC3DFAF5; Fri, 2 Jun 2017 14:43:02 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ptupitsyn@apache.org To: commits@ignite.apache.org Message-Id: <749656144660402a88fdbb5fb0aadcd8@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: ignite git commit: IGNITE-5393 .NET: Fix NuGet suite build Date: Fri, 2 Jun 2017 14:43:02 +0000 (UTC) archived-at: Fri, 02 Jun 2017 14:43:03 -0000 Repository: ignite Updated Branches: refs/heads/master 3d7b15b1a -> 4024cd3a3 IGNITE-5393 .NET: Fix NuGet suite build This closes #2069 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/4024cd3a Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4024cd3a Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4024cd3a Branch: refs/heads/master Commit: 4024cd3a3e2c3c9cd41a16018a15aaf8b0e3daad Parents: 3d7b15b Author: Pavel Tupitsyn Authored: Fri Jun 2 17:42:54 2017 +0300 Committer: Pavel Tupitsyn Committed: Fri Jun 2 17:42:54 2017 +0300 ---------------------------------------------------------------------- .../Apache.Ignite.Core.Tests.NuGet/NuGet.config | 2 +- .../StartupTest.cs | 1 - .../install-package.ps1 | 31 ++++++++------------ modules/platforms/dotnet/build.ps1 | 5 +++- 4 files changed, 18 insertions(+), 21 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/4024cd3a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.NuGet/NuGet.config ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.NuGet/NuGet.config b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.NuGet/NuGet.config index fc0c0b5..8ef3fb0 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.NuGet/NuGet.config +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.NuGet/NuGet.config @@ -26,7 +26,7 @@ - + http://git-wip-us.apache.org/repos/asf/ignite/blob/4024cd3a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.NuGet/StartupTest.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.NuGet/StartupTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.NuGet/StartupTest.cs index db62e09..0eb7a96 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.NuGet/StartupTest.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.NuGet/StartupTest.cs @@ -17,7 +17,6 @@ namespace Apache.Ignite.Core.Tests.NuGet { - using System; using System.Diagnostics; using System.IO; using System.Linq; http://git-wip-us.apache.org/repos/asf/ignite/blob/4024cd3a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.NuGet/install-package.ps1 ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.NuGet/install-package.ps1 b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.NuGet/install-package.ps1 index 3289918..8d36e0e 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.NuGet/install-package.ps1 +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.NuGet/install-package.ps1 @@ -1,22 +1,6 @@ -$ng = (Get-Item .).FullName + '\nuget.exe' +$ver = (gi ..\Apache.Ignite.Core\bin\Release\Apache.Ignite.Core.dll).VersionInfo.ProductVersion -if (!(Test-Path $ng)) { - $ng = 'nuget' -} - -$cfg = 'Release' -$ver = (gi ..\Apache.Ignite.Core\bin\$cfg\Apache.Ignite.Core.dll).VersionInfo.ProductVersion - -rmdir nupkg -Force -Recurse -rmdir pkg -Force -Recurse - -mkdir nupkg -mkdir pkg - -# Find all nuspec files and run 'nuget pack' either directly, or on corresponding csproj files (if present). -ls ..\*.nuspec -Recurse ` - | % { If (Test-Path ([io.path]::ChangeExtension($_.FullName, ".csproj"))){[io.path]::ChangeExtension($_.FullName, ".csproj")} Else {$_.FullName} } ` - | % { & $ng pack $_ -Prop Configuration=$cfg -Version $ver -Prop Platform=AnyCPU -OutputDirectory nupkg } +rmdir packages -Force -Recurse # Replace versions in project files (Get-Content packages.config) ` @@ -26,6 +10,17 @@ ls ..\*.nuspec -Recurse ` (Get-Content Apache.Ignite.Core.Tests.NuGet.csproj) ` -replace 'packages\\Apache.Ignite(.*?)\.\d.*?\\', ('packages\Apache.Ignite$1.' + "$ver\") ` | Out-File Apache.Ignite.Core.Tests.NuGet.csproj -Encoding utf8 + +# Detect NuGet +$ng = "nuget" +if ((Get-Command $ng -ErrorAction SilentlyContinue) -eq $null) { + $ng = ".\nuget.exe" + + if (-not (Test-Path $ng)) { + echo "Downloading NuGet..." + (New-Object System.Net.WebClient).DownloadFile("https://dist.nuget.org/win-x86-commandline/v3.3.0/nuget.exe", "nuget.exe"); + } +} # restore packages & $ng restore http://git-wip-us.apache.org/repos/asf/ignite/blob/4024cd3a/modules/platforms/dotnet/build.ps1 ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/build.ps1 b/modules/platforms/dotnet/build.ps1 index 222076a..692959f 100644 --- a/modules/platforms/dotnet/build.ps1 +++ b/modules/platforms/dotnet/build.ps1 @@ -112,7 +112,10 @@ if (!$skipJava) { $libsDir = "$PSScriptRoot\bin\Libs" mkdir -Force $libsDir; del -Force $libsDir\*.* - ls modules\indexing\target,modules\core\target,modules\spring\target*.jar -recurse -include "ignite-core*","ignite-indexing*","ignite-shmem*","ignite-spring*","lucene*","h2*","cache-api*","commons-*","spring*" -exclude "*-sources*","*-javadoc*","*-tests*" | % { copy -Force $_ $libsDir } + ls modules\indexing\target,modules\core\target,modules\spring\target *.jar -recurse ` + -include "ignite-core*","ignite-indexing*","ignite-shmem*","ignite-spring*","lucene*","h2*","cache-api*","commons-*","spring*" ` + -exclude "*-sources*","*-javadoc*","*-tests*" ` + | % { copy -Force $_ $libsDir } # Restore directory cd $PSScriptRoot