私の psake ビルド スクリプトには、"Release" に設定した $build_mode というプロパティがあります。
2 つのタスクがあります。「Compile_Debug」、「Compile_Release」。Compile_Debug で、$build_mode を「Debug」に変更すると、そのタスクの実行中に問題なく動作します。ただし、後で $build_mode を使用する別のタスクを実行すると、$build_mode は "Release" に戻ります。
タスク間で更新された値を使用できるように、Psake ビルド スクリプトで変数をグローバルに変更または設定する方法はありますか?
(「Test_Debug」などの代わりに、1 つの「テスト」または 1 つの「パッケージ」タスクを作成しようとしています。)
コード:
properties {
$build_mode = "Release"
}
task default -depends Compile_Debug, Test
task Compile_Debug {
$build_mode = "Debug"
# Compilation tasks here that use the Debug value
}
task Test {
# Test related tasks that depend on $build_mode being updated.
}