38 lines
1.4 KiB
Groovy
38 lines
1.4 KiB
Groovy
|
|
def differences(meta, String sourcerevision, String previoussourcerevision, String sourcepath) {
|
|
def String cs = autobuilder.commonscripts()
|
|
def String difffile = meta.difffilepath()
|
|
def String jirakey = meta.productinfo.jirakey
|
|
if (isUnix()) {
|
|
sh """
|
|
"${PYTHON}" -u "${cs}/differences/show_release_differences.py" -g "${sourcepath}" -s "${sourcerevision}" -p "${previoussourcerevision}" -j "${jirakey}" -o "opposite notcommon" -f "${difffile}"
|
|
"""
|
|
}
|
|
else {
|
|
bat """
|
|
"${PYTHON}" -u "${cs}\\differences\\show_release_differences.py" -g "${sourcepath}" -s "${sourcerevision}" -p "${previoussourcerevision}" -j "${jirakey}" -o "opposite notcommon" -f "${difffile}"
|
|
"""
|
|
}
|
|
}
|
|
|
|
def getdifferencerecords(earlymeta, latermeta, String sourcepath) {
|
|
boolean result = true;
|
|
def List differencerecords = []
|
|
|
|
def earlygitinfo = earlymeta.gitinfo
|
|
def latergitinfo = latermeta.gitinfo
|
|
|
|
if (earlygitinfo.remoteurl == latergitinfo.remoteurl) {
|
|
def uniquefolderforsourcerepo = getcomponent(earlymeta)
|
|
def earlyrevision = earlygitinfo.gitrevision
|
|
def laterrevision = latergitinfo.gitrevision
|
|
echo "Comparing early revision: ${earlyrevision} with: ${laterrevision} Working copy path: ${sourcepath}"
|
|
} else {
|
|
echo "The early and later git urls don't match"
|
|
result = false;
|
|
}
|
|
|
|
return [result, differencerecords]
|
|
}
|
|
|
|
return this;
|