有没有办法在 bat 文件或 ps1 文件中使用 conan 包管理器命令? 或任何其他自动化方式..
我想自动化柯南安装/构建/打包命令。
注意:所有命令都像来自 PS 的单个调用一样顺利运行。
我设法让它工作..不知道为什么它第一次失败了,因为它毕竟相当简单。我认为 Mathias 的评论很有帮助,因为它很有说服力,应该去。
$thisDir= Get-Location
$buildDir = "$thisDir\build"
if (Test-Path $buildDir)
{
Remove-Item -Path $buildDir -Force
}
New-Item -ItemType Directory -Path $buildDir
Set-Location -Path $buildDir
conan install .. --update --build=missing
conan build ..
conan package ..
Set-Location -Path $thisDir