我想要的是一个我可以双击的文件,它将使用 psake 运行所需的构建过程。
我是 psake 和 PowerShell 的新手,所以要温柔:-)。
我现在有3个文件:
文件 1:Build.bat
PowerShell -ExecutionPolicy Unrestricted -File .\Build.ps1 %1
文件 2:构建.ps1
Import-Module .\psake.psm1
Invoke-psake .\BuildTasks.ps1 $args
文件 3:BuildTasks.ps1
task default -depends Verify, Joe
task Verify {
write-host "hello from Verify!"
}
task Joe {
write-host "hello from Joe"
}
无论如何将 Build.ps1 和 BuildTasks.ps1 合并到一个文件中?