cpkg: set git identity before merge
This commit is contained in:
parent
2f0f2c43ab
commit
ea2412eeb2
|
@ -31,11 +31,14 @@ def call(Map params = [:]) {
|
||||||
|
|
||||||
// Merge currentRef into distBranch and push
|
// Merge currentRef into distBranch and push
|
||||||
sh("git checkout -b '${distBranch}' 'origin/${distBranch}'")
|
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}")
|
sh("git merge ${currentRef}")
|
||||||
|
|
||||||
if (!skipPush) {
|
if (!skipPush) {
|
||||||
sh("git config user.email '${gitEmail}'")
|
|
||||||
sh("git config user.username '${gitUsername}'")
|
|
||||||
sh("git push")
|
sh("git push")
|
||||||
} else {
|
} else {
|
||||||
println("Skipping push. Set skipPush param to 'true' to enable remote repository update.")
|
println("Skipping push. Set skipPush param to 'true' to enable remote repository update.")
|
||||||
|
|
Loading…
Reference in New Issue