Skip to content

Commit db0ccbc

Browse files
authored
Release/0.12.0 (buehler#157)
* Version bump to v0.12.0 * Update changelog to v0.12.0 * add fancy pancy script for releases
1 parent 72137fd commit db0ccbc

File tree

3 files changed

+45
-2
lines changed

3 files changed

+45
-2
lines changed

CHANGELOG.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

55
## [Unreleased]
6+
7+
## [0.12.0]
68
#### Added
79
- Added setting `typescriptHero.resolver.insertSemicolons` to make disabling of semicolon emit possible (defaults to true)
810

@@ -143,7 +145,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
143145
- Various bugs in AST parsing
144146

145147

146-
[Unreleased]: https://github.com/buehler/typescript-hero/compare/v0.11.0...master
148+
[Unreleased]: https://github.com/buehler/typescript-hero/compare/v0.12.0...master
149+
[0.12.0]: https://github.com/buehler/typescript-hero/compare/v0.11.0...v0.12.0
147150
[0.11.0]: https://github.com/buehler/typescript-hero/compare/v0.10.1...v0.11.0
148151
[0.10.1]: https://github.com/buehler/typescript-hero/compare/v0.10.0...v0.10.1
149152
[0.10.0]: https://github.com/buehler/typescript-hero/compare/v0.9.0...v0.10.0

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"color": "#1e324c",
88
"theme": "dark"
99
},
10-
"version": "0.11.0",
10+
"version": "0.12.0",
1111
"publisher": "rbbit",
1212
"engines": {
1313
"vscode": "^1.6.0",

prepare-release.js

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/usr/bin/env node
2+
3+
const fs = require('fs'),
4+
exec = require('child_process').execSync;
5+
6+
if (!process.argv || process.argv.length < 3) {
7+
throw new Error('missing argument (ver nr)');
8+
}
9+
10+
const versionNumber = process.argv[2];
11+
12+
console.log('Create release branch');
13+
14+
exec(`git checkout -b release/${versionNumber}`);
15+
16+
console.log(`Update package.json to version v${versionNumber}`);
17+
18+
let packageJson = fs.readFileSync('./package.json', 'utf-8');
19+
packageJson = packageJson.replace(/"version": .*,/, `"version": "${versionNumber}",`);
20+
21+
fs.writeFileSync('./package.json', packageJson, { encoding: 'utf-8' });
22+
23+
console.log(`Update changelog`);
24+
25+
let changelog = fs.readFileSync('./CHANGELOG.md', 'utf-8');
26+
changelog = changelog.replace(/## \[Unreleased\]/, `## [Unreleased]\n\n## [${versionNumber}]`);
27+
changelog = changelog.replace(/\[Unreleased\]\:.*v(.*)\.\.\.master/, `[Unreleased]: https://github.com/buehler/typescript-hero/compare/v${versionNumber}...master
28+
[${versionNumber}]: https://github.com/buehler/typescript-hero/compare/v$1...v${versionNumber}`);
29+
30+
fs.writeFileSync('./CHANGELOG.md', changelog, { encoding: 'utf-8' });
31+
32+
console.log('Commit package.json');
33+
34+
exec('git add package.json');
35+
exec(`git commit -m "Version bump to v${versionNumber}"`);
36+
37+
console.log('Commit changelog');
38+
39+
exec('git add CHANGELOG.md');
40+
exec(`git commit -m "Update changelog to v${versionNumber}"`);

0 commit comments

Comments
 (0)