From b72ddc8a0dbe538b9c1efe0608a55fd51789601f Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sun, 9 Jan 2022 22:21:37 +0000 Subject: [PATCH] Create a script for publishing a set of debian packages to a remote update server --- publish/packagecollection.groovy | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/publish/packagecollection.groovy b/publish/packagecollection.groovy index 7d64c94..e59566d 100644 --- a/publish/packagecollection.groovy +++ b/publish/packagecollection.groovy @@ -23,8 +23,8 @@ def packagecollection = null } */ -def String packagecollection_asJsonText() { - return writeJSON(returnText: true, json: packagecollection, pretty: 1) +def String asJsonText(somejson = packagecollection) { + return writeJSON(returnText: true, json: somejson, pretty: 1) } def boolean packagecollection_exists() { @@ -33,7 +33,7 @@ def boolean packagecollection_exists() { def packagecollection_set(String jsontext) { packagecollection = readJSON(text: jsontext) - echo "Package collection info:\n${packagecollection_asJsonText()}" + echo "Package collection info:\n${asJsonText(packagecollection)}" } def packagecollection_get() { @@ -72,7 +72,7 @@ pipeline { debpackagecollection.packages.each { debpackageinfo-> def packagekey = debpackageinfo.key - echo "Processing package: ${packagekey}\n${debpackageinfo}" + echo "Processing package: ${packagekey}\n${asJsonText(debpackageinfo)}" def packagedest = "${PACKAGEDEST}/${packagekey}" def packageimportoptions = importer.getNewImportOptions()