1
0
mirror of synced 2024-11-24 19:53:10 +01:00

Added DataAnnotations package to NuGet publish script

This commit is contained in:
Mark van Renswoude 2017-02-12 22:00:08 +01:00
parent e881ed94c1
commit 4a9afe41d4
3 changed files with 55 additions and 26 deletions

View File

@ -1,5 +1,33 @@
param([switch]$nopush) 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 New-Item -Path publish -Type directory -Force | Out-Null
$version = GitVersion.exe | Out-String | ConvertFrom-Json $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 "Publishing version $($version.NuGetVersion) using API key $($nugetkey)"-Foreground Cyan
foreach ($project in $projects)
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)" pack($project)
}
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)"
if ($nopush -eq $false) if ($nopush -eq $false)
{ {
Write-Host "Pushing Tapeti.Annotations.csproj" -Foreground Blue foreach ($project in $projects)
NuGet.exe push publish\X2Software.Tapeti.Annotations.$($version.NuGetVersion).nupkg -apikey $nugetkey -Source https://www.nuget.org/api/v2/package {
push($project)
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
} }
else else
{ {

View File

@ -0,0 +1,19 @@
<?xml version="1.0"?>
<package >
<metadata>
<id>X2Software.Tapeti.DataAnnotations</id>
<version>$version$</version>
<title>$title$</title>
<authors>Mark van Renswoude</authors>
<owners>Mark van Renswoude</owners>
<licenseUrl>https://git.x2software.net/pub/tapeti/raw/master/UNLICENSE</licenseUrl>
<projectUrl>https://git.x2software.net/pub/tapeti</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>DataAnnotations validation extension for Tapeti</description>
<copyright></copyright>
<tags>rabbitmq tapeti dataannotations</tags>
<dependencies>
<dependency id="X2Software.Tapeti" version="[$depversion$]" />
</dependencies>
</metadata>
</package>

View File

@ -95,9 +95,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="packages.config" /> <None Include="packages.config" />
<None Include="Tapeti.nuspec">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Tapeti.Annotations\Tapeti.Annotations.csproj"> <ProjectReference Include="..\Tapeti.Annotations\Tapeti.Annotations.csproj">