Created
February 16, 2014 15:01
-
-
Save tanaka-takayoshi/9035651 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Param ( | |
$parameters = @{}, | |
$srcFolder, | |
$scriptFolder, | |
$projectName, | |
$projectVersion | |
) | |
# get script variables | |
$nugetApiKey = $parameters["NuGetApiKey-secure"] | |
# update package version in nuspec file | |
Write-Output "Updating version in nuspec file" | |
$nuspecPath = "$scriptFolder\Chatwork.Api.nuspec" | |
[xml]$xml = Get-Content $nuspecPath | |
$xml.package.metadata.version = $projectVersion | |
$xml.Save($nuspecPath) | |
# build NuGet package | |
Write-Output "Building NuGet package" | |
."$srcFolder\.nuget\NuGet.exe" pack $scriptFolder\Chatwork.Api.nuspec | |
# publish NuGet package | |
Write-Output "Publishing NuGet package" | |
."$srcFolder\.nuget\NuGet.exe" push $srcFolder\Chatwork.Api.$projectVersion.nupkg $nugetApiKey |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment