Changeset 970141d


Ignore:
Timestamp:
Oct 4, 2019, 9:56:24 AM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
19858f6
Parents:
34e1494 (diff), 85142648 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'jenkins-sandbox'

Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • Jenkinsfile

    r34e1494 r970141d  
    224224//Routine responsible of sending the email notification once the build is completed
    225225//===========================================================================================================
     226@NonCPS
     227def SplitLines(String text) {
     228        def list = []
     229
     230        text.eachLine {
     231                list += it
     232        }
     233
     234        return list
     235}
     236
    226237def GitLogMessage() {
    227238        if (!Settings || !Settings.GitOldRef || !Settings.GitNewRef) return "\nERROR retrieveing git information!\n"
    228239
    229         sh "${SrcDir}/tools/PrettyGitLogs.sh ${SrcDir} ${BuildDir} ${Settings.GitOldRef} ${Settings.GitNewRef}"
    230 
    231         def gitUpdate = readFile("${BuildDir}/GIT_UPDATE")
    232         def gitLog    = readFile("${BuildDir}/GIT_LOG")
    233         def gitDiff   = readFile("${BuildDir}/GIT_DIFF")
     240        def oldRef = Settings.GitOldRef
     241        def newRef = Settings.GitNewRef
     242
     243        def revText = sh(returnStdout: true, script: "git rev-list ${oldRef}..${newRef}").trim()
     244        def revList = SplitLines( revText )
     245
     246        def gitUpdate = ""
     247        revList.each { rev ->
     248                def type = sh(returnStdout: true, script: "git cat-file -t ${rev}").trim()
     249                gitUpdate = gitUpdate + "       via  ${rev} (${type})"
     250        }
     251
     252        def rev = oldRef
     253        def type = sh(returnStdout: true, script: "git cat-file -t ${rev}").trim()
     254        gitUpdate = gitUpdate + "      from  ${rev} (${type})"
     255
     256        def gitLog    = sh(returnStdout: true, script: "git rev-list --format=short ${oldRef}...${newRef}").trim()
     257
     258        def gitDiff   = sh(returnStdout: true, script: "git diff --stat --color ${newRef} ${oldRef}").trim()
     259        gitDiff = gitDiff.replace('[32m', '<span style="color: #00AA00;">')
     260        gitDiff = gitDiff.replace('[31m', '<span style="color: #AA0000;">')
     261        gitDiff = gitDiff.replace('[m', '</span>')
    234262
    235263        return """
Note: See TracChangeset for help on using the changeset viewer.