version.js 425 B

12345678910111213141516
  1. #!/usr/bin/env node
  2. // Synchronizes ethpm.json version number with package.json.
  3. // Useful to run as an npm script alogn with `npm version`.
  4. const fs = require('fs');
  5. const cp = require('child_process');
  6. const pkg = require('../package.json');
  7. const ethpm = require('../ethpm.json');
  8. ethpm.version = pkg.version;
  9. fs.writeFileSync('ethpm.json', JSON.stringify(ethpm, null, 2) + '\n');
  10. cp.execSync('git add ethpm.json');