diff mbox series

[yocto-autobuilder-helper,3/5] metrics: Pass branchname to scripts

Message ID 20231023154356.1145934-3-richard.purdie@linuxfoundation.org
State New
Headers show
Series [yocto-autobuilder-helper,1/5] scripts/run-patchmetrics: Only clone metrics if it isn't present | expand

Commit Message

Richard Purdie Oct. 23, 2023, 3:43 p.m. UTC
To prepapre to run the scripts per branch, pass the branchname to the scripts.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 config.json              | 4 ++--
 scripts/run-cvecheck     | 1 +
 scripts/run-patchmetrics | 1 +
 3 files changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/config.json b/config.json
index f225148..0c35632 100644
--- a/config.json
+++ b/config.json
@@ -1209,11 +1209,11 @@ 
             ],
             "step1" : {
                 "shortname" : "Generating patch metrics",
-                "EXTRACMDS" : ["../../yocto-autobuilder-helper/scripts/run-patchmetrics ../ ../meta/ ${HELPERRESULTSDIR}/../../patchmetrics ."]
+                "EXTRACMDS" : ["../../yocto-autobuilder-helper/scripts/run-patchmetrics ../ ../meta/ ${HELPERRESULTSDIR}/../../patchmetrics . ${HELPERBRANCHNAME}"]
             },
             "step2" : {
                 "shortname" : "Running CVE checks",
-                "EXTRACMDS" : ["../../yocto-autobuilder-helper/scripts/run-cvecheck ../ ../meta/ ${HELPERRESULTSDIR}/../../patchmetrics ."]
+                "EXTRACMDS" : ["../../yocto-autobuilder-helper/scripts/run-cvecheck ../ ../meta/ ${HELPERRESULTSDIR}/../../patchmetrics . ${HELPERBRANCHNAME}"]
             }
 
         },
diff --git a/scripts/run-cvecheck b/scripts/run-cvecheck
index 35c796b..d48fd68 100755
--- a/scripts/run-cvecheck
+++ b/scripts/run-cvecheck
@@ -6,6 +6,7 @@  PARENTDIR=`realpath $1`
 TARGETDIR=`realpath $2`
 RESULTSDIR=`realpath -m $3`
 BUILDDIR=`realpath $4`
+BRANCH=$5
 OURDIR=`dirname $0`
 
 TIMESTAMP=`date +"%s"`
diff --git a/scripts/run-patchmetrics b/scripts/run-patchmetrics
index e45d463..20e6268 100755
--- a/scripts/run-patchmetrics
+++ b/scripts/run-patchmetrics
@@ -6,6 +6,7 @@  PARENTDIR=`realpath $1`
 TARGETDIR=`realpath $2`
 RESULTSDIR=`realpath -m $3`
 BUILDDIR=`realpath $4`
+BRANCH=$5
 OURDIR=`dirname $0`
 
 TIMESTAMP=`date +"%s"`