|
|
@ -4,11 +4,13 @@ import fetch from "node-fetch"; |
|
|
|
const metadata = await fetch(pluginsDirectory, { method: 'GET' }) |
|
|
|
const metadata = await fetch(pluginsDirectory, { method: 'GET' }) |
|
|
|
|
|
|
|
|
|
|
|
// get command line arguments
|
|
|
|
// get command line arguments
|
|
|
|
const args = process.argv |
|
|
|
const args = process.argv.slice(2) |
|
|
|
const pluginName = args[0] |
|
|
|
const pluginName = args[0] |
|
|
|
const sha = args[1] |
|
|
|
const sha = args[1] |
|
|
|
const build = args[2] |
|
|
|
const build = args[2] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log(process.argv) |
|
|
|
|
|
|
|
|
|
|
|
if (!pluginName || !sha || !build) { |
|
|
|
if (!pluginName || !sha || !build) { |
|
|
|
console.error('missing arguments') |
|
|
|
console.error('missing arguments') |
|
|
|
process.exit(1) |
|
|
|
process.exit(1) |
|
|
@ -23,7 +25,7 @@ import fetch from "node-fetch"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// update the plugin
|
|
|
|
// update the plugin
|
|
|
|
plugin.build = build |
|
|
|
plugin.build = 'someurl' |
|
|
|
plugin.sha = sha |
|
|
|
plugin.sha = sha |
|
|
|
|
|
|
|
|
|
|
|
console.log('publishing plugin', plugin, 'with sha', sha, 'and build', build) |
|
|
|
console.log('publishing plugin', plugin, 'with sha', sha, 'and build', build) |
|
|
|