Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add version script to update ethpm.json (#906)
- Loading branch information
Showing
2 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/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'); |