Skip to content

Commit bc28a58

Browse files
committed
bump version script
1 parent e136e9f commit bc28a58

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

bump-version.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
const fs = require('fs');
2+
3+
const VERSION = process.env.VERSION;
4+
5+
console.log("Bumping to " + VERSION);
6+
7+
function withJsonFile(name, callback) {
8+
const text = fs.readFileSync(name);
9+
const json = JSON.parse(text);
10+
callback(json)
11+
fs.writeFileSync(name, JSON.stringify(json, null, " "))
12+
}
13+
14+
withJsonFile("./core/package.json", j => {
15+
j.version = VERSION;
16+
});
17+
18+
withJsonFile("./tea-cup/package.json", j => {
19+
j.version = VERSION;
20+
j.peerDependencies['tea-cup-core'] = '^' + VERSION;
21+
});
22+
23+
withJsonFile('./samples/package.json', j => {
24+
j.dependencies['tea-cup-core'] = VERSION;
25+
j.dependencies['react-tea-cup'] = VERSION;
26+
});
27+

0 commit comments

Comments
 (0)