diff --git a/product/info.groovy b/product/info.groovy index 8b8d3e2..536d336 100644 --- a/product/info.groovy +++ b/product/info.groovy @@ -26,9 +26,9 @@ class ProductInfo { return data } - def saveJsonSerialised(String outputfile, int prettylevel = 4) { - def outJson = readJSON text: groovy.json.JsonOutput.toJson(serialisationdata()) - writeJSON(file: outputfile, json: outJson, pretty: prettylevel) + def saveJsonSerialised(script, String outputfile, int prettylevel = 4) { + def outJson = script.readJSON text: groovy.json.JsonOutput.toJson(serialisationdata()) + script.writeJSON(file: outputfile, json: outJson, pretty: prettylevel) } } @@ -38,7 +38,7 @@ def setname(productname = PRODUCT_NAME, subcomponentname = SUBCOMPONENT_NAME, ji theProductInfo = new ProductInfo(productname, subcomponentname, jirakey) def PRODUCTFILE = "${PRODUCTFOLDER}/info.json" - theProductInfo.saveJsonSerialised(PRODUCTFILE) + theProductInfo.saveJsonSerialised(this, PRODUCTFILE) } return this; \ No newline at end of file