File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,7 +46,8 @@ var getGitRepoInfo = function() {
4646 * @return {String } The codename if found, otherwise null/undefined
4747 */
4848var 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 ] ;
5051 var codeName = tagMessage && tagMessage . match ( / c o d e n a m e \( ( .* ) \) / ) [ 1 ] ;
5152 if ( ! codeName ) {
5253 throw new Error ( "Could not extract release code name. The message of tag " + tagName +
@@ -105,10 +106,10 @@ var getPreviousVersions = function() {
105106 // not contain all commits when cloned with git clone --depth=...
106107 // Needed e.g. for Travis
107108 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 ,
109110 { silent : true } ) ;
110111 if ( tagResults . code === 0 ) {
111- return _ ( tagResults . output . trim ( ) . split ( '\n' ) )
112+ return _ ( tagResults . output . match ( / v [ 0 - 9 ] . * [ 0 - 9 ] $ / mg ) )
112113 . map ( function ( tag ) {
113114 var version = semver . parse ( tag ) ;
114115 return version ;
You can’t perform that action at this time.
0 commit comments