File tree 1 file changed +4
-3
lines changed 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,8 @@ var getGitRepoInfo = function() {
46
46
* @return {String } The codename if found, otherwise null/undefined
47
47
*/
48
48
var getCodeName = function ( tagName ) {
49
- var tagMessage = shell . exec ( 'git cat-file -p ' + tagName + ' | grep "codename"' , { silent :true } ) . output ;
49
+ var gitCatOutput = shell . exec ( 'git cat-file -p ' + tagName , { silent :true } ) . output ;
50
+ var tagMessage = gitCatOutput . match ( / ^ .* c o d e n a m e .* $ / mg) [ 0 ] ;
50
51
var codeName = tagMessage && tagMessage . match ( / c o d e n a m e \( ( .* ) \) / ) [ 1 ] ;
51
52
if ( ! codeName ) {
52
53
throw new Error ( "Could not extract release code name. The message of tag " + tagName +
@@ -105,10 +106,10 @@ var getPreviousVersions = function() {
105
106
// not contain all commits when cloned with git clone --depth=...
106
107
// Needed e.g. for Travis
107
108
var repo_url = currentPackage . repository . url ;
108
- var tagResults = shell . exec ( 'git ls-remote --tags ' + repo_url + ' | grep -o -e "v[0-9].*[0-9]$"' ,
109
+ var tagResults = shell . exec ( 'git ls-remote --tags ' + repo_url ,
109
110
{ silent : true } ) ;
110
111
if ( tagResults . code === 0 ) {
111
- return _ ( tagResults . output . trim ( ) . split ( '\n' ) )
112
+ return _ ( tagResults . output . match ( / v [ 0 - 9 ] . * [ 0 - 9 ] $ / mg ) )
112
113
. map ( function ( tag ) {
113
114
var version = semver . parse ( tag ) ;
114
115
return version ;
You can’t perform that action at this time.
0 commit comments