From 429bc3edf44433e7b48c4d546572ad1ec316991e Mon Sep 17 00:00:00 2001 From: Mark van Renswoude Date: Sun, 12 Feb 2017 22:00:08 +0100 Subject: [PATCH] Added DataAnnotations package to NuGet publish script --- Publish.ps1 | 59 +++++++++++-------- .../Tapeti.DataAnnotations.nuspec | 19 ++++++ Tapeti/Tapeti.csproj | 3 - 3 files changed, 55 insertions(+), 26 deletions(-) create mode 100644 Tapeti.DataAnnotations/Tapeti.DataAnnotations.nuspec diff --git a/Publish.ps1 b/Publish.ps1 index 23fff30..7646e36 100644 --- a/Publish.ps1 +++ b/Publish.ps1 @@ -1,5 +1,33 @@ param([switch]$nopush) + +function pack +{ + param([string]$project) + + Write-Host "Packing $($project).csproj" -Foreground Blue + NuGet.exe pack "$($project)\$($project).csproj" -Build -OutputDir publish -Version "$($version.NuGetVersion)" -Properties depversion="$($version.NuGetVersion)" +} + + +function push +{ + param([string]$project) + + Write-Host "Pushing $($project).csproj" -Foreground Blue + NuGet.exe push "publish\X2Software.$($project).$($version.NuGetVersion).nupkg" -apikey "$($nugetkey)" -Source https://www.nuget.org/api/v2/package +} + + +$projects = @( + "Tapeti.Annotations", + "Tapeti", + "Tapeti.DataAnnotations", + "Tapeti.Flow", + "Tapeti.SimpleInjector" +) + + New-Item -Path publish -Type directory -Force | Out-Null $version = GitVersion.exe | Out-String | ConvertFrom-Json @@ -8,33 +36,18 @@ $nugetkey = Get-Content .nuget.apikey Write-Host "Publishing version $($version.NuGetVersion) using API key $($nugetkey)"-Foreground Cyan - -Write-Host "Packing Tapeti.Annotations.csproj" -Foreground Blue -NuGet.exe pack Tapeti.Annotations\Tapeti.Annotations.csproj -OutputDir publish -Version $version.NuGetVersion -Properties depversion="$($version.NuGetVersion)" - -Write-Host "Packing Tapeti.csproj" -Foreground Blue -NuGet.exe pack Tapeti\Tapeti.csproj -OutputDir publish -Version $version.NuGetVersion -Properties depversion="$($version.NuGetVersion)" - -Write-Host "Packing Tapeti.Flow.csproj" -Foreground Blue -NuGet.exe pack Tapeti.Flow\Tapeti.Flow.csproj -OutputDir publish -Version $version.NuGetVersion -Properties depversion="$($version.NuGetVersion)" - -Write-Host "Packing Tapeti.SimpleInjector.csproj" -Foreground Blue -NuGet.exe pack Tapeti.SimpleInjector\Tapeti.SimpleInjector.csproj -OutputDir publish -Version $version.NuGetVersion -Properties depversion="$($version.NuGetVersion)" +foreach ($project in $projects) +{ + pack($project) +} if ($nopush -eq $false) { - Write-Host "Pushing Tapeti.Annotations.csproj" -Foreground Blue - NuGet.exe push publish\X2Software.Tapeti.Annotations.$($version.NuGetVersion).nupkg -apikey $nugetkey -Source https://www.nuget.org/api/v2/package - - Write-Host "Pushing Tapeti.csproj" -Foreground Blue - NuGet.exe push publish\X2Software.Tapeti.$($version.NuGetVersion).nupkg -apikey $nugetkey -Source https://www.nuget.org/api/v2/package - - Write-Host "Pushing Tapeti.Flow.csproj" -Foreground Blue - NuGet.exe push publish\X2Software.Tapeti.Flow.$($version.NuGetVersion).nupkg -apikey $nugetkey -Source https://www.nuget.org/api/v2/package - - Write-Host "Pushing Tapeti.SimpleInjector.csproj" -Foreground Blue - NuGet.exe push publish\X2Software.Tapeti.SimpleInjector.$($version.NuGetVersion).nupkg -apikey $nugetkey -Source https://www.nuget.org/api/v2/package + foreach ($project in $projects) + { + push($project) + } } else { diff --git a/Tapeti.DataAnnotations/Tapeti.DataAnnotations.nuspec b/Tapeti.DataAnnotations/Tapeti.DataAnnotations.nuspec new file mode 100644 index 0000000..9bd9cbf --- /dev/null +++ b/Tapeti.DataAnnotations/Tapeti.DataAnnotations.nuspec @@ -0,0 +1,19 @@ + + + + X2Software.Tapeti.DataAnnotations + $version$ + $title$ + Mark van Renswoude + Mark van Renswoude + https://git.x2software.net/pub/tapeti/raw/master/UNLICENSE + https://git.x2software.net/pub/tapeti + false + DataAnnotations validation extension for Tapeti + + rabbitmq tapeti dataannotations + + + + + \ No newline at end of file diff --git a/Tapeti/Tapeti.csproj b/Tapeti/Tapeti.csproj index 2ed3f8f..fd1d275 100644 --- a/Tapeti/Tapeti.csproj +++ b/Tapeti/Tapeti.csproj @@ -95,9 +95,6 @@ - - Always -