diff --git a/src/Tools/build/DotVVM.AspNetCore.nuspec b/src/Tools/build/DotVVM.AspNetCore.nuspec deleted file mode 100644 index a4a0957eb7..0000000000 --- a/src/Tools/build/DotVVM.AspNetCore.nuspec +++ /dev/null @@ -1,41 +0,0 @@ - - - - DotVVM.AspNetCore - 1.1.0-beta - RIGANTI - RIGANTI s.r.o. - https://github.com/riganti/dotvvm/blob/master/LICENSE - http://github.org/riganti/dotvvm - false - DotVVM.AspNetCore is DotNet Core hosting layer for DotVVM projects. - - https://dotvvm.com/Content/images/icons/icon-blue-64x64.png - - dotvvm,asp.net,mvvm,owin,dotnetcore - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Tools/build/DotVVM.Core.nuspec b/src/Tools/build/DotVVM.Core.nuspec deleted file mode 100644 index 27486e8a69..0000000000 --- a/src/Tools/build/DotVVM.Core.nuspec +++ /dev/null @@ -1,40 +0,0 @@ - - - - DotVVM.Core - 1.1.0-beta - RIGANTI - RIGANTI s.r.o. - https://github.com/riganti/dotvvm/blob/master/LICENSE - http://github.org/riganti/dotvvm - false - - Contains base classes and interfaces of DotVVM that might be useful in a business layer. - DotVVM is an OWIN-based ASP.NET framework that allows you to write rich client applications using the MVVM pattern without writing javascript code. - - - https://dotvvm.com/Content/images/icons/icon-blue-64x64.png - - dotvvm,asp.net,mvvm,owin,dotnetcore - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Tools/build/DotVVM.Owin.nuspec b/src/Tools/build/DotVVM.Owin.nuspec deleted file mode 100644 index 8e97c985c0..0000000000 --- a/src/Tools/build/DotVVM.Owin.nuspec +++ /dev/null @@ -1,27 +0,0 @@ - - - - DotVVM.Owin - 1.1.0-beta - Riganti s.r.o. - Riganti s.r.o. - false - https://dotvvm.com/Content/images/icons/icon-blue-64x64.png - DotVVM.Owin is hosting layer for DotVVM Projects. - dotvvm dotvvm asp.net mvvm owin - - - - - - - - - - - - - - - - diff --git a/src/Tools/build/DotVVM.nuspec b/src/Tools/build/DotVVM.nuspec deleted file mode 100644 index 5cd5dae506..0000000000 --- a/src/Tools/build/DotVVM.nuspec +++ /dev/null @@ -1,53 +0,0 @@ - - - - DotVVM - 1.1.0-beta - RIGANTI - RIGANTI s.r.o. - https://github.com/riganti/dotvvm/blob/master/LICENSE - http://github.org/riganti/dotvvm - false - DotVVM is an ASP.NET framework that allows you to write rich client applications using the MVVM pattern without writing javascript code. - - https://dotvvm.com/Content/images/icons/icon-blue-64x64.png - - dotvvm,asp.net,mvvm,owin,dotnetcore - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Tools/build/publish.ps1 b/src/Tools/build/publish.ps1 index b40de0582b..e6b8b0bc76 100644 --- a/src/Tools/build/publish.ps1 +++ b/src/Tools/build/publish.ps1 @@ -1,4 +1,37 @@ -param([String]$version, [String]$apiKey, [String]$server, [String]$branchName, [String]$repoUrl) +param([String]$version, [String]$apiKey, [String]$server, [String]$branchName, [String]$repoUrl, [String]$nugetRestoreAltSource) + + +### Helper Functions + +function Invoke-Git { +<# +.Synopsis +Wrapper function that deals with Powershell's peculiar error output when Git uses the error stream. + +.Example +Invoke-Git ThrowError +$LASTEXITCODE + +#> + [CmdletBinding()] + param( + [parameter(ValueFromRemainingArguments=$true)] + [string[]]$Arguments + ) + + & { + [CmdletBinding()] + param( + [parameter(ValueFromRemainingArguments=$true)] + [string[]]$InnerArgs + ) + git.exe $InnerArgs 2>&1 + } -ErrorAction SilentlyContinue -ErrorVariable fail @Arguments + + if ($fail) { + $fail.Exception + } +} function CleanOldGeneratedPackages() { foreach ($package in $packages) { @@ -25,7 +58,7 @@ function SetVersion() { function BuildPackages() { foreach ($package in $packages) { cd .\$($package.Directory) - & dotnet restore + & dotnet restore --source $nugetRestoreAltSource --source https://nuget.org/api/v2/ & dotnet pack cd .. } @@ -38,17 +71,20 @@ function PushPackages() { } function GitCheckout() { - & git checkout $branchName 2>&1 - & git -c http.sslVerify=false pull $repoUrl 2>&1 + invoke-git checkout $branchName + invoke-git -c http.sslVerify=false pull $repoUrl $branchName } function GitPush() { - & git commit -am "NuGet package version $version" - & git rebase HEAD $branchName - & git -c http.sslVerify=false push $repoUrl $branchName 2>&1 + invoke-git commit -am "NuGet package version $version" + invoke-git rebase HEAD $branchName + invoke-git -c http.sslVerify=false push $repoUrl $branchName } + +### Configuration + $packages = @( [pscustomobject]@{ Package = "DotVVM.Core"; Directory = "DotVVM.Core" }, [pscustomobject]@{ Package = "DotVVM"; Directory = "DotVVM.Framework" }, @@ -56,6 +92,10 @@ $packages = @( [pscustomobject]@{ Package = "DotVVM.AspNetCore"; Directory = "DotVVM.Framework.Hosting.AspNetCore" } ) + + +### Publish Workflow + $versionWithoutPre = $version if ($versionWithoutPre.Contains("-")) { $versionWithoutPre = $versionWithoutPre.Substring(0, $versionWithoutPre.IndexOf("-"))