Skip to content

Commit d8e52e9

Browse files
fix release.js and ignore stats.html
1 parent a8bd912 commit d8e52e9

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ _doc
1717
lib
1818
lib-esm
1919
release
20+
stats.html

scripts/release.js

+9-4
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,33 @@ if (!readlineSync.keyInYN('Did you push all changes back to origin?')) {
2424
process.exit(1);
2525
}
2626

27+
if (!readlineSync.keyInYN('Ready to publish?')) {
28+
process.exit(1);
29+
}
30+
2731
util.ensureCleanMaster('master');
2832

2933
_exec('npm run package');
3034
_exec(`npm run docs`);
3135

3236
console.log('Updating version in bower.json to ${version}');
3337

34-
let bowerJson = JSON.parse(fs.readFileSync(BOWER_JSON, 'UTF-8'));
38+
let bowerJson = JSON.parse(fs.readFileSync('bower.json', 'UTF-8'));
3539
bowerJson.version = version;
36-
fs.writeFileSync(BOWER_JSON, asJson(bowerJson));
37-
_exec(`git commit -m "Release ${version}"`);
40+
fs.writeFileSync('bower.json', JSON.stringify(bowerJson));
41+
_exec(`git commit -m "Release ${version}" bower.json`);
3842

3943
util.ensureCleanMaster('master');
4044

4145
// publish to npm first
4246
_exec(`npm publish`);
4347

44-
// then branch, add/commit release files, tag, and push
48+
// then tag and push tag
4549
_exec(`git tag ${version}`);
4650
_exec(`git push`);
4751
_exec(`git push origin ${version}`);
4852

53+
// branch, add/commit release files, and push to bower repository
4954
_exec(`git checkout -b bower-${version}`);
5055
_exec(`git add --force release`);
5156
_exec(`git commit -m "bower release ${version}"`);

0 commit comments

Comments
 (0)