mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
fix(grunt): fix regex in grunt util to handle pre-release versions
NOTE: this also includes a temporary work-around for Bower
This commit is contained in:
parent
607ed4ee46
commit
553fdb318f
1 changed files with 3 additions and 1 deletions
|
|
@ -17,7 +17,9 @@ module.exports = {
|
|||
if (version) return version;
|
||||
|
||||
var package = JSON.parse(fs.readFileSync('package.json', 'UTF-8'));
|
||||
var match = package.version.match(/^([^\-]*)(-snapshot)?$/);
|
||||
// TODO(brian): change `(-|rc)` to `-` in the regex below after bower
|
||||
// fixes this issue: https://github.com/bower/bower/issues/782
|
||||
var match = package.version.match(/^([^\-]*)(?:(-|rc)(.+))?$/);
|
||||
var semver = match[1].split('.');
|
||||
var hash = shell.exec('git rev-parse --short HEAD', {silent: true}).output.replace('\n', '');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue