Commit 46fcf9bf by Ryan McKinley Committed by GitHub

Toolkit: wrap plugin signing stub with error checking (#22626)

parent aa7e6cf5
......@@ -39,7 +39,8 @@ const manifestRunner: TaskRunner<ManifestOptions> = async ({ folder }) => {
// Call a signing service
const GRAFANA_API_KEY = process.env.GRAFANA_API_KEY;
if (GRAFANA_API_KEY) {
const plugin = require('plugin.json');
const pluginPath = path.join(folder, 'plugin.json');
const plugin = require(pluginPath);
const url = `https://grafana.com/api/plugins/${plugin.id}/sign`;
console.log(`TODO: sign and save: ${url}`);
}
......
......@@ -168,7 +168,11 @@ const packagePluginRunner: TaskRunner<PluginCIOptions> = async () => {
});
// Write a manifest.txt file in the dist folder
try {
await execTask(manifestTask)({ folder: distContentDir });
} catch (err) {
console.warn(`Error signing manifest: ${distContentDir}`, err);
}
console.log('Building ZIP');
let zipName = pluginInfo.id + '-' + pluginInfo.info.version + '.zip';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment