Bladeren bron

Updaet build scripts

Oren Novotny 9 jaren geleden
bovenliggende
commit
0ce65bcd5e
3 gewijzigde bestanden met toevoegingen van 15 en 13 verwijderingen
  1. 2 1
      Ix.NET/Source/build-new.ps1
  2. 10 12
      Rx.NET/Source/build-new.ps1
  3. 3 0
      Rx.NET/Source/global.json

+ 2 - 1
Ix.NET/Source/build-new.ps1

@@ -19,5 +19,6 @@ foreach ($project in $projects) {
 
 Write-Host "Running tests" -Foreground Green
 $testDirectory = Join-Path $scriptPath "Tests"
-dnx -p $testDirectory test
+cd  $testDirectory 
+dotnet test
 

+ 10 - 12
Rx.NET/Source/build-new.ps1

@@ -5,21 +5,19 @@ $msbuild = Get-ItemProperty "hklm:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0
 # TODO: if not found, bail out
 $msbuildExe = Join-Path $msbuild.MSBuildToolsPath "msbuild.exe"
 
-$active = dnvm list -PassThru | Where-Object {$_.Active -eq $true }
-
-$version = $active | Select -ExpandProperty Version
-$runtime = $active | Select -ExpandProperty Runtime
-$architecture = $active | Select -ExpandProperty Architecture
-
-$runtimeDir = Join-Path $env:USERPROFILE "\.dnx\runtimes\dnx-$runtime-win-$architecture.$version"
-
 Write-Host "Restoring packages" -Foreground Green
-dnu restore $scriptPath --quiet | out-null
+dotnet restore $scriptPath | out-null
 
 Write-Host "Building projects" -Foreground Green
-$solutionPath = Join-Path $scriptPath "Rx-New.sln"
-. $msbuildExe $solutionPath /m /p:Configuration=Release /p:RuntimeToolingDirectory=$runtimeDir /v:q
+$projects = gci $scriptPath -Directory `
+  | Where-Object { Test-Path (Join-Path $_.FullName "project.json")  } `
+  | Select -ExpandProperty FullName
+
+foreach ($project in $projects) {
+  dotnet build $project
+}
 
 Write-Host "Running tests" -Foreground Green
 $testDirectory = Join-Path $scriptPath "Tests.System.Reactive"
-dnx -p $testDirectory test
+cd $testDirectory 
+dotnet test

+ 3 - 0
Rx.NET/Source/global.json

@@ -0,0 +1,3 @@
+{
+    "sources": [ ".", "Tests.System.Reactive" ]
+}