pretty format git log

This commit is contained in:
Primakov Alexandr Alexandrovich 2024-04-11 13:02:51 +03:00
parent da048592da
commit ecbdbfc291

View File

@ -1,7 +1,8 @@
stage('install:ci') {
def tag = sh(returnStdout: true, script: "git tag --contains").trim()
def branchName = sh(returnStdout: true, script: "git rev-parse --abbrev-ref HEAD").trim()
def lastLog = sh(returnStdout: true, script: "git log -1").trim()
// def lastLog = sh(returnStdout: true, script: "git log -1").trim()
def lastLog = sh(returnStdout: true, script: "git show -s --format='%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative").trim()
if (tag) {
currentBuild.displayName = "#${BUILD_NUMBER}, tag ${tag}"
} else {