Back to the boards

This commit is contained in:
Jim Nicholson 2024-02-13 23:19:08 -08:00
parent 2eac580110
commit 178122d4f6

View File

@ -41,22 +41,25 @@ void call(Map config = [:], Closure body) {
withEnv(venvEnv) {
if (runConfig.updatePip) {
updateCmd = "${venvPython} -m pip install --upgrade pip"
updateCmd = "${venvPython.join('/')} -m pip install --upgrade pip"
echo "Updating pip with (${updateCmd})"
sh updateCmd
sh """
env
${updateCmd}
"""
}
if (runConfig.installPipTools) {
installCmd = "${venvPython} -m pip install pip-tools"
echo "Installing pip-tools with (${installCmd})"
sh installCmd
}
if (fileExists(runConfig.requirementsFile)) {
reqCmd = "pip-compile ${runConfig.requirementsFile}"
echo "Collecting requirements with (${reqCmd})"
sh reqCmd
}
echo 'Executing closure...'
body()
// if (runConfig.installPipTools) {
// installCmd = "${venvPython.join('/')} -m pip install pip-tools"
// echo "Installing pip-tools with (${installCmd})"
// sh installCmd
// }
// if (fileExists(runConfig.requirementsFile)) {
// reqCmd = "pip-compile ${runConfig.requirementsFile}"
// echo "Collecting requirements with (${reqCmd})"
// sh reqCmd
// }
// echo 'Executing closure...'
// body()
}
}
}