Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 1a7e9de

Browse files
chore(version-info): use branchPattern where we are replacing *
1 parent 299b3e7 commit 1a7e9de

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/versions/version-info.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ var getTaggedVersion = function() {
8383
if ( version && semver.satisfies(version, currentPackage.branchVersion)) {
8484
version.codeName = getCodeName(tag);
8585
version.full = version.version;
86-
version.branch = 'v' + currentPackage.branchVersion.replace('*', 'x');
86+
version.branch = 'v' + currentPackage.branchPattern.replace('*', 'x');
8787
return version;
8888
}
8989
}
@@ -130,13 +130,17 @@ var getCdnVersion = function() {
130130
return semver.satisfies(tag, currentPackage.branchVersion);
131131
})
132132
.reverse()
133+
.tap(function(versions) {
134+
console.log(versions);
135+
})
133136
.reduce(function(cdnVersion, version) {
134137
if (!cdnVersion) {
135138
// Note: need to use shell.exec and curl here
136139
// as version-infos returns its result synchronously...
137140
var cdnResult = shell.exec('curl http://ajax.googleapis.com/ajax/libs/angularjs/'+version+'/angular.min.js '+
138141
'--head --write-out "%{http_code}" -o /dev/null -silent',
139-
{silent: true});
142+
{silent: false});
143+
console.log('http://ajax.googleapis.com/ajax/libs/angularjs/'+version+'/angular.min.js');
140144
if ( cdnResult.code === 0 ) {
141145
var statusCode = cdnResult.output.trim();
142146
if (statusCode === '200') {
@@ -161,7 +165,7 @@ var getSnapshotVersion = function() {
161165

162166
if ( !version ) {
163167
// a snapshot version before the first tag on the branch
164-
version = semver(currentPackage.branchVersion.replace('*','0-beta.1'));
168+
version = semver(currentPackage.branchPattern.replace('*','0-beta.1'));
165169
}
166170

167171
// We need to clone to ensure that we are not modifying another version

0 commit comments

Comments
 (0)