From 3f11e680bfe74fa8f288f3b8a671fdf191cac2c9 Mon Sep 17 00:00:00 2001 From: Victor Usoltsev Date: Thu, 22 Mar 2018 00:42:31 +1300 Subject: [PATCH] Increases version number to 0.2.0. Adds package publishing script. --- Scripts/PublishPackages.ps1 | 56 +++++++++++++++++++ .../Vima.LoggingAbstractor.AppInsights.csproj | 4 +- .../Vima.LoggingAbstractor.Console.csproj | 4 +- .../Vima.LoggingAbstractor.Core.csproj | 4 +- .../Vima.LoggingAbstractor.Raygun.csproj | 4 +- .../Vima.LoggingAbstractor.Sentry.csproj | 4 +- 6 files changed, 66 insertions(+), 10 deletions(-) create mode 100644 Scripts/PublishPackages.ps1 diff --git a/Scripts/PublishPackages.ps1 b/Scripts/PublishPackages.ps1 new file mode 100644 index 0000000..5e10376 --- /dev/null +++ b/Scripts/PublishPackages.ps1 @@ -0,0 +1,56 @@ +$ErrorActionPreference = "Stop" +$PackagesDir = Join-Path -Path $PSScriptRoot -ChildPath "../Artifacts/Packages" +$NugetDir = Join-Path -Path $PSScriptRoot -ChildPath "../Temp/nuget.exe" + +function Main { + $packages = Get-ChildItem -Path $PackagesDir + Write-Host "Following packages were found:" -ForegroundColor Yellow + Write-Host $packages -Separator "`n" + + $result = Get-Approval-To-Execute + switch ($result) { + 0 { + Write-Host "Continuing..." -ForegroundColor Yellow + Start-Sleep -s 10 + Publish-Packages $packages + } + + 1 { + Write-Host "Exiting..." -ForegroundColor Yellow + } + } +} + +function Get-Approval-To-Execute { + $title = "Publish Packages" + $message = "Are you sure you want to publish the packages listed above to nuget.org?" + $yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes", "Packages will be published!" + $no = New-Object System.Management.Automation.Host.ChoiceDescription "&No", "Script execution will stop." + $options = [System.Management.Automation.Host.ChoiceDescription[]]($yes, $no) + return $host.ui.PromptForChoice($title, $message, $options, 1) +} + +function Publish-Packages { + param ( [System.Array] $Packages) + + $nugetExeFile = Get-Item -Path $NugetDir + + $symbolsPackagesPattern = ".*.symbols.nupkg" + $nugetPackagesPattern = ".*(? - 0.1.0 - 0.1.0 + 0.2.0 + 0.2.0 Victor Usoltsev Logging Abstractor is a library for .NET that allows you to swap out logging providers with ease. Copyright © Victor Usoltsev 2018 diff --git a/Source/Vima.LoggingAbstractor.Console/Vima.LoggingAbstractor.Console.csproj b/Source/Vima.LoggingAbstractor.Console/Vima.LoggingAbstractor.Console.csproj index 9ccf355..14409aa 100644 --- a/Source/Vima.LoggingAbstractor.Console/Vima.LoggingAbstractor.Console.csproj +++ b/Source/Vima.LoggingAbstractor.Console/Vima.LoggingAbstractor.Console.csproj @@ -1,8 +1,8 @@ - 0.1.0 - 0.1.0 + 0.2.0 + 0.2.0 Victor Usoltsev Logging Abstractor is a library for .NET that allows you to swap out logging providers with ease. Copyright © Victor Usoltsev 2018 diff --git a/Source/Vima.LoggingAbstractor.Core/Vima.LoggingAbstractor.Core.csproj b/Source/Vima.LoggingAbstractor.Core/Vima.LoggingAbstractor.Core.csproj index 1210f15..0f22867 100644 --- a/Source/Vima.LoggingAbstractor.Core/Vima.LoggingAbstractor.Core.csproj +++ b/Source/Vima.LoggingAbstractor.Core/Vima.LoggingAbstractor.Core.csproj @@ -1,8 +1,8 @@ - 0.1.0 - 0.1.0 + 0.2.0 + 0.2.0 Victor Usoltsev Logging Abstractor is a library for .NET that allows you to swap out logging providers with ease. Copyright © Victor Usoltsev 2018 diff --git a/Source/Vima.LoggingAbstractor.Raygun/Vima.LoggingAbstractor.Raygun.csproj b/Source/Vima.LoggingAbstractor.Raygun/Vima.LoggingAbstractor.Raygun.csproj index f60790c..e6a79f6 100644 --- a/Source/Vima.LoggingAbstractor.Raygun/Vima.LoggingAbstractor.Raygun.csproj +++ b/Source/Vima.LoggingAbstractor.Raygun/Vima.LoggingAbstractor.Raygun.csproj @@ -1,8 +1,8 @@ - 0.1.0 - 0.1.0 + 0.2.0 + 0.2.0 Victor Usoltsev Logging Abstractor is a library for .NET that allows you to swap out logging providers with ease. Copyright © Victor Usoltsev 2018 diff --git a/Source/Vima.LoggingAbstractor.Sentry/Vima.LoggingAbstractor.Sentry.csproj b/Source/Vima.LoggingAbstractor.Sentry/Vima.LoggingAbstractor.Sentry.csproj index 4a19a1a..8973539 100644 --- a/Source/Vima.LoggingAbstractor.Sentry/Vima.LoggingAbstractor.Sentry.csproj +++ b/Source/Vima.LoggingAbstractor.Sentry/Vima.LoggingAbstractor.Sentry.csproj @@ -1,8 +1,8 @@ - 0.1.0 - 0.1.0 + 0.2.0 + 0.2.0 Victor Usoltsev Logging Abstractor is a library for .NET that allows you to swap out logging providers with ease. Copyright © Victor Usoltsev 2018