From 1a7e9de8d8efcb1b2453b5553fa4aad36521750f Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Wed, 14 Jan 2015 20:44:32 +0000 Subject: [PATCH] chore(version-info): use branchPattern where we are replacing * --- lib/versions/version-info.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/versions/version-info.js b/lib/versions/version-info.js index b46738c9fe16..1908cf985575 100644 --- a/lib/versions/version-info.js +++ b/lib/versions/version-info.js @@ -83,7 +83,7 @@ var getTaggedVersion = function() { if ( version && semver.satisfies(version, currentPackage.branchVersion)) { version.codeName = getCodeName(tag); version.full = version.version; - version.branch = 'v' + currentPackage.branchVersion.replace('*', 'x'); + version.branch = 'v' + currentPackage.branchPattern.replace('*', 'x'); return version; } } @@ -130,13 +130,17 @@ var getCdnVersion = function() { return semver.satisfies(tag, currentPackage.branchVersion); }) .reverse() + .tap(function(versions) { + console.log(versions); + }) .reduce(function(cdnVersion, version) { if (!cdnVersion) { // Note: need to use shell.exec and curl here // as version-infos returns its result synchronously... var cdnResult = shell.exec('curl http://ajax.googleapis.com/ajax/libs/angularjs/'+version+'/angular.min.js '+ '--head --write-out "%{http_code}" -o /dev/null -silent', - {silent: true}); + {silent: false}); + console.log('http://ajax.googleapis.com/ajax/libs/angularjs/'+version+'/angular.min.js'); if ( cdnResult.code === 0 ) { var statusCode = cdnResult.output.trim(); if (statusCode === '200') { @@ -161,7 +165,7 @@ var getSnapshotVersion = function() { if ( !version ) { // a snapshot version before the first tag on the branch - version = semver(currentPackage.branchVersion.replace('*','0-beta.1')); + version = semver(currentPackage.branchPattern.replace('*','0-beta.1')); } // We need to clone to ensure that we are not modifying another version