mirror of
https://github.com/Sarsoo/IF.Lastfm.git
synced 2024-10-17 07:13:09 +01:00
0bb5529365
nuget property in appveyor.yml adds the feeds to NuGet's sources, doesn't publish to them
27 lines
812 B
PowerShell
27 lines
812 B
PowerShell
param(
|
|
[string] $versionSuffix
|
|
)
|
|
|
|
$root = (split-path -parent $MyInvocation.MyCommand.Definition) + '\..'
|
|
$version = [System.Reflection.Assembly]::LoadFile("$root\src\IF.Lastfm.Core\bin\Release\IF.Lastfm.Core.dll").GetName().Version
|
|
|
|
if ($versionSuffix)
|
|
{
|
|
$versionStr = "{0}.{1}.{2}-{3}" -f ($version.Major, $version.Minor, $version.Build, $versionSuffix)
|
|
}
|
|
else
|
|
{
|
|
$versionStr = $version.ToString()
|
|
}
|
|
|
|
Write-Host "Setting .nuspec version tag to $versionStr"
|
|
|
|
$content = (Get-Content $root\.nuget\IF.Lastfm.nuspec)
|
|
$content = $content -replace '\$version',$versionStr
|
|
|
|
$content | Out-File $root\.nuget\IF.Lastfm.$versionStr.compiled.nuspec
|
|
|
|
& $root\.nuget\NuGet.exe pack $root\.nuget\IF.Lastfm.$versionStr.compiled.nuspec
|
|
|
|
# publish to appveyor feeds
|
|
appveyor PushArtifact IF.Lastfm.$versionStr.nupkg |