Skip to content
This repository has been archived by the owner on Oct 10, 2018. It is now read-only.

Commit

Permalink
Release/0.12.0 (#157)
Browse files Browse the repository at this point in the history
* Version bump to v0.12.0

* Update changelog to v0.12.0

* add fancy pancy script for releases
  • Loading branch information
buehler committed Jan 3, 2017
1 parent 72137fd commit db0ccbc
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 2 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Expand Up @@ -3,6 +3,8 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [0.12.0]
#### Added
- Added setting `typescriptHero.resolver.insertSemicolons` to make disabling of semicolon emit possible (defaults to true)

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


[Unreleased]: https://github.com/buehler/typescript-hero/compare/v0.11.0...master
[Unreleased]: https://github.com/buehler/typescript-hero/compare/v0.12.0...master
[0.12.0]: https://github.com/buehler/typescript-hero/compare/v0.11.0...v0.12.0
[0.11.0]: https://github.com/buehler/typescript-hero/compare/v0.10.1...v0.11.0
[0.10.1]: https://github.com/buehler/typescript-hero/compare/v0.10.0...v0.10.1
[0.10.0]: https://github.com/buehler/typescript-hero/compare/v0.9.0...v0.10.0
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -7,7 +7,7 @@
"color": "#1e324c",
"theme": "dark"
},
"version": "0.11.0",
"version": "0.12.0",
"publisher": "rbbit",
"engines": {
"vscode": "^1.6.0",
Expand Down
40 changes: 40 additions & 0 deletions prepare-release.js
@@ -0,0 +1,40 @@
#!/usr/bin/env node

const fs = require('fs'),
exec = require('child_process').execSync;

if (!process.argv || process.argv.length < 3) {
throw new Error('missing argument (ver nr)');
}

const versionNumber = process.argv[2];

console.log('Create release branch');

exec(`git checkout -b release/${versionNumber}`);

console.log(`Update package.json to version v${versionNumber}`);

let packageJson = fs.readFileSync('./package.json', 'utf-8');
packageJson = packageJson.replace(/"version": .*,/, `"version": "${versionNumber}",`);

fs.writeFileSync('./package.json', packageJson, { encoding: 'utf-8' });

console.log(`Update changelog`);

let changelog = fs.readFileSync('./CHANGELOG.md', 'utf-8');
changelog = changelog.replace(/## \[Unreleased\]/, `## [Unreleased]\n\n## [${versionNumber}]`);
changelog = changelog.replace(/\[Unreleased\]\:.*v(.*)\.\.\.master/, `[Unreleased]: https://github.com/buehler/typescript-hero/compare/v${versionNumber}...master
[${versionNumber}]: https://github.com/buehler/typescript-hero/compare/v$1...v${versionNumber}`);

fs.writeFileSync('./CHANGELOG.md', changelog, { encoding: 'utf-8' });

console.log('Commit package.json');

exec('git add package.json');
exec(`git commit -m "Version bump to v${versionNumber}"`);

console.log('Commit changelog');

exec('git add CHANGELOG.md');
exec(`git commit -m "Update changelog to v${versionNumber}"`);

0 comments on commit db0ccbc

Please sign in to comment.