2014-11-21 00:01:39 +00:00
|
|
|
param(
|
|
|
|
[string] $versionSuffix
|
|
|
|
)
|
|
|
|
|
2014-11-20 23:27:39 +00:00
|
|
|
$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
|
2014-11-21 00:01:39 +00:00
|
|
|
|
|
|
|
if ($versionSuffix)
|
|
|
|
{
|
|
|
|
$versionStr = "{0}.{1}.{2}-{3}" -f ($version.Major, $version.Minor, $version.Build, $versionSuffix)
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$versionStr = $version.ToString()
|
|
|
|
}
|
2014-11-20 23:27:39 +00:00
|
|
|
|
|
|
|
Write-Host "Setting .nuspec version tag to $versionStr"
|
|
|
|
|
|
|
|
$content = (Get-Content $root\.nuget\IF.Lastfm.nuspec)
|
|
|
|
$content = $content -replace '\$version',$versionStr
|
|
|
|
|
2014-11-21 00:01:39 +00:00
|
|
|
$content | Out-File $root\.nuget\IF.Lastfm.$versionStr.compiled.nuspec
|
2014-11-20 23:27:39 +00:00
|
|
|
|
2014-11-21 01:13:40 +00:00
|
|
|
& $root\.nuget\NuGet.exe pack $root\.nuget\IF.Lastfm.$versionStr.compiled.nuspec
|
|
|
|
|
|
|
|
# publish to appveyor feeds
|
|
|
|
appveyor PushArtifact IF.Lastfm.$versionStr.nupkg
|