mirror of
https://github.com/Sarsoo/IF.Lastfm.git
synced 2024-10-16 23:13:07 +01:00
Fixing NuGet on the build server
This commit is contained in:
parent
e20378a1fe
commit
02e85e4da4
@ -2,18 +2,6 @@ param(
|
||||
[string] $versionSuffix
|
||||
)
|
||||
|
||||
. ".\Package-Versions.ps1"
|
||||
|
||||
$root = (split-path -parent $MyInvocation.MyCommand.Definition) + '\..'
|
||||
$version = [System.Reflection.AssemblyName]::GetAssemblyName($dllPath).Version
|
||||
|
||||
if ($versionSuffix) {
|
||||
$versionStr = "{0}.{1}.{2}-{3}" -f ($version.Major, $version.Minor, $version.Build, $versionSuffix)
|
||||
}
|
||||
else {
|
||||
$versionStr = $version.ToString()
|
||||
}
|
||||
|
||||
function CompileNuspec([string]$dllPath, [string]$nuspecname)
|
||||
{
|
||||
Write-Host "Setting $nuspecname .nuspec version tag to $versionStr" -Foreground green
|
||||
@ -26,7 +14,21 @@ function CompileNuspec([string]$dllPath, [string]$nuspecname)
|
||||
& $root\.nuget\NuGet.exe pack "$root\.nuget\$nuspecname.$versionStr.compiled.nuspec"
|
||||
}
|
||||
|
||||
CompileNuspec "$root\src\IF.Lastfm.Core\bin\Release\IF.Lastfm.Core.dll" "Inflatable.Lastfm"
|
||||
. ".\Package-Versions.ps1"
|
||||
|
||||
$root = (split-path -parent $MyInvocation.MyCommand.Definition) + '\..'
|
||||
|
||||
$dllPath = "$root\src\IF.Lastfm.Core\bin\Release\IF.Lastfm.Core.dll"
|
||||
$version = [System.Reflection.AssemblyName]::GetAssemblyName($dllPath).Version
|
||||
|
||||
if ($versionSuffix) {
|
||||
$versionStr = "{0}.{1}.{2}-{3}" -f ($version.Major, $version.Minor, $version.Build, $versionSuffix)
|
||||
}
|
||||
else {
|
||||
$versionStr = $version.ToString()
|
||||
}
|
||||
|
||||
CompileNuspec $dllPath "Inflatable.Lastfm"
|
||||
|
||||
if ([string]::IsNullOrEmpty($sqliteVersion)){
|
||||
Write-Host "Couldn't read version to use for SQLite package" -Foreground red
|
||||
|
@ -24,7 +24,9 @@
|
||||
- ps: .\run-tests.ps1
|
||||
|
||||
after_test:
|
||||
- ps: .nuget\pack.ps1 -versionSuffix prerelease
|
||||
- ps: pushd .nuget
|
||||
- ps: .\pack.ps1 -versionSuffix prerelease
|
||||
- ps: popd
|
||||
|
||||
artifacts:
|
||||
- path: src\IF.Lastfm.Core\bin\Release\IF.Lastfm.Core.dll
|
||||
@ -66,7 +68,9 @@
|
||||
- ps: .\run-tests.ps1
|
||||
|
||||
after_test:
|
||||
- ps: pushd .nuget
|
||||
- ps: .nuget\pack.ps1
|
||||
- ps: popd
|
||||
|
||||
artifacts:
|
||||
- path: src\IF.Lastfm.Core\bin\Release\IF.Lastfm.Core.dll
|
||||
|
Loading…
Reference in New Issue
Block a user