2016-11-23 5 views
1

Jenkinsと連携するようにSquirrelを設定しようとしています。ビルド番号のみを表示する簡単なプロジェクト(テスト用に作成)があります。jenkinsと連携するようにSquirrelを設定する

私はそれがassembly.cs内部バージョンを取るために持っていることを伝えるにはどうすればよい

enter image description here

としてジェンキンスを設定していますか?その情報をsquirrelコマンドにどのように渡すのですか?

おかげ

答えて

0

私はジェンキンスとの経験がないが、これは私が私のポストビルド・スクリプトに何をすべきかです。バージョンは@(VersionNumber)パラメータを介してpowershellスクリプトに渡され、.nuspecファイルが変更されます。 Execute Windows Batch Command関数を呼び出してアプリを解放する前に、似たようなことをしなければならないと思います。

Visual Studioのビルド後に実行するコマンドライン

if $(ConfigurationName) ==Release "C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -ExecutionPolicy RemoteSigned -file "$(ProjectDir)\"PostBuild.ps1 "$(ProjectDir) " @(VersionNumber) 

PostBuild.ps1

param (
[string]$ProjectDir, 
[string]$Revision 
) 

    #write new version to nuspec 
    $nuspec_file_name = "Package.nuspec" 

    $nuspec_file_path = "$ProjectDir$nuspec_file_name" 
    Write-Host "nuspec file: $nuspec_file_path" 
    [xml]$nuspec_xml = Get-Content($nuspec_file_path) 
    $nuspec_xml.package.metadata.version = $Revision 
    $nuspec_xml.Save($nuspec_file_path) 
関連する問題