parent
0eed6023cf
commit
8de534eb3e
@ -1,7 +1,7 @@ |
|||||||
#!/usr/bin/env bash |
#!/usr/bin/env bash |
||||||
|
|
||||||
set -e |
set -e |
||||||
|
sha1sum persist/plugin-$1.zip |
||||||
yarn run tsc --version |
npx ts-node apps/remix-ide/ci/publish_plugin.ts 328782397 alpha |
||||||
|
|
||||||
git clone git@github.com:ethereum/remix-plugins-directory.git |
git clone git@github.com:ethereum/remix-plugins-directory.git |
@ -0,0 +1,30 @@ |
|||||||
|
import fetch from "node-fetch"; |
||||||
|
(async () => { |
||||||
|
const pluginsDirectory = 'https://raw.githubusercontent.com/ethereum/remix-plugins-directory/master/build/metadata.json' |
||||||
|
const metadata = await fetch(pluginsDirectory, { method: 'GET' }) |
||||||
|
|
||||||
|
// get command line arguments
|
||||||
|
const args = process.argv.slice(2) |
||||||
|
const pluginName = args[0] |
||||||
|
const sha = args[1] |
||||||
|
const build = args[2] |
||||||
|
|
||||||
|
if (!pluginName || !sha || !build) { |
||||||
|
console.error('missing arguments') |
||||||
|
process.exit(1) |
||||||
|
} |
||||||
|
|
||||||
|
// search for the plugin in the metadata
|
||||||
|
const plugins = await metadata.json() |
||||||
|
const plugin = plugins.find((p: any) => p.name === pluginName) |
||||||
|
if (!plugin) { |
||||||
|
console.error('plugin not found') |
||||||
|
process.exit(1) |
||||||
|
} |
||||||
|
|
||||||
|
// update the plugin
|
||||||
|
plugin.build = build |
||||||
|
plugin.sha = sha |
||||||
|
|
||||||
|
console.log('publishing plugin', plugin, 'with sha', sha, 'and build', build) |
||||||
|
})() |
Loading…
Reference in new issue