diff --git a/packages/datadog-instrumentations/src/helpers/matrices.json b/packages/datadog-instrumentations/src/helpers/matrices.json index c0b12098fe0..4506e85f89a 100644 --- a/packages/datadog-instrumentations/src/helpers/matrices.json +++ b/packages/datadog-instrumentations/src/helpers/matrices.json @@ -5,15 +5,15 @@ "16" ], "range": [ - "2.4.2 - 2.6.12", - "3.0.7 - 3.2.7", - "4.0.0 - 4.4.2" + [ + "2.4.2 - 2.6.12", + "3.0.7 - 3.2.7", + "4.0.0 - 4.4.2" + ] ], "include": [ { - "node-version": [ - "18" - ], + "node-version": "18", "range": [ "4.4.1 - 4.4.2" ] diff --git a/scripts/create_matrix.js b/scripts/create_matrix.js index e696c2f3373..fef982a4edd 100644 --- a/scripts/create_matrix.js +++ b/scripts/create_matrix.js @@ -55,18 +55,17 @@ function generateMatrix (name) { const range = [] const plugin = versionsPlugin['node-versions'] for (const version in plugin) { - range.push({ 'node-version': [version], range: plugin[version] }) + range.push({ 'node-version': version, range: plugin[version] }) } for (let ele = 0; ele < range.length; ele++) { if (ele === 0) { - matrix['node-version'] = range[ele]['node-version'] - matrix.range = range[ele].range + matrix['node-version'] = [range[ele]['node-version']] + matrix.range = [range[ele].range] } else { matrix.include = [range[ele]] } } - matricesJson.matrices[name] = matrix } else { matrix = { @@ -77,7 +76,7 @@ function generateMatrix (name) { } fs.writeFileSync(matricesPath, JSON.stringify(matricesJson, null, 2)) } - +generateMatrix('couchbase') module.exports = { generateMatrix }