ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ptupit...@apache.org
Subject ignite git commit: IGNITE-5393 .NET: Fix NuGet suite build
Date Fri, 02 Jun 2017 14:43:02 GMT
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 <ptupitsyn@apache.org>
Authored: Fri Jun 2 17:42:54 2017 +0300
Committer: Pavel Tupitsyn <ptupitsyn@apache.org>
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 @@
   </packageRestore>
   <packageSources>
 	<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
-    <add key="local" value="nupkg" />
+    <add key="local" value="..\nupkg" />
   </packageSources>
   <!-- Used to specify which one of the sources are active -->
   <activePackageSource>

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


Mime
View raw message