Unverified Commit 90413e75 by Francisco Giordano Committed by GitHub

add version script to update ethpm.json (#906)

parent 76fe1548
...@@ -11,7 +11,8 @@ ...@@ -11,7 +11,8 @@
"lint:all": "npm run lint && npm run lint:sol", "lint:all": "npm run lint && npm run lint:sol",
"lint:all:fix": "npm run lint:fix && npm run lint:sol:fix", "lint:all:fix": "npm run lint:fix && npm run lint:sol:fix",
"console": "truffle console", "console": "truffle console",
"coverage": "scripts/coverage.sh" "coverage": "scripts/coverage.sh",
"version": "scripts/version.js"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
......
#!/usr/bin/env node
// Synchronizes ethpm.json version number with package.json.
// Useful to run as an npm script alogn with `npm version`.
const fs = require('fs');
const cp = require('child_process');
const pkg = require('../package.json');
const ethpm = require('../ethpm.json');
ethpm.version = pkg.version;
fs.writeFileSync('ethpm.json', JSON.stringify(ethpm, null, 2) + '\n');
cp.execSync('git add ethpm.json');
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