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

compare-master-to-stable.js script doesn't work properly after switch to 1.4 #10816

Closed
pkozlowski-opensource opened this issue Jan 20, 2015 · 3 comments
Milestone

Comments

@pkozlowski-opensource
Copy link
Member

The output says that it compares master with 1.2.x (instead of 1.3.x). To be investigated / fixed.

@rphv
Copy link
Contributor

rphv commented Jan 20, 2015

The tag on the latest version is v1.4.0-beta.0. The prerelease tag ("beta") causes it to be excluded from the set of versions that's checked - see documentation for semver.

Specifically, semver.satisfies('1.4.0-beta.0','1.x') returns false:

https://github.com/angular/angular.js/blob/master/compare-master-to-stable.js#L109

One possible fix to ensure the most recent version is included:

function (tags) {
  var currentTag = tags[0];
  var major = currentTag.split('.')[0] + '.x';
  return tags.
    filter(function (ver) {
      return semver.satisfies(ver, major) || ver == currentTag;
    });
}

rphv added a commit to rphv/angular.js that referenced this issue Jan 20, 2015
…omparisons

Change to include current prerelease versions in comparisons

Closes angular#10816
@petebacondarwin
Copy link
Contributor

This is fixed by 452d1cd

@Narretz
Copy link
Contributor

Narretz commented Apr 20, 2016

Closing since it seems fixed.

@Narretz Narretz closed this as completed Apr 20, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants