cpkg: set git identity before merge

This commit is contained in:
wpetit 2020-03-24 10:36:07 +01:00
parent 2f0f2c43ab
commit ea2412eeb2

View File

@ -31,11 +31,14 @@ def call(Map params = [:]) {
// Merge currentRef into distBranch and push
sh("git checkout -b '${distBranch}' 'origin/${distBranch}'")
// Add git username/email
sh("git config user.email '${gitEmail}'")
sh("git config user.username '${gitUsername}'")
sh("git merge ${currentRef}")
if (!skipPush) {
sh("git config user.email '${gitEmail}'")
sh("git config user.username '${gitUsername}'")
sh("git push")
} else {
println("Skipping push. Set skipPush param to 'true' to enable remote repository update.")