public override IEnumerable <string> FindSatisfying(IGit git, string repo) { return(git.ListTags(repo).Where((tag) => { // Match tag against constraint Semver semver; if (Semver.TryParse(tag, out semver)) { return Condition.CompareTo(semver); } return false; }).SelectMany((tag) => { return git.CommitsForTag(repo, tag); })); }
public bool CompareTo(Semver y) { return(Root.Major == y.Major && y.Minor > Root.Minor); }
public bool CompareTo(Semver y) { return(y <= Root); }
public GreaterMinorRevisionComparison(Semver semver) { this.Root = semver; }
public LessEqualComparison(Semver semver) { this.Root = semver; }
public GreaterEqualComparison(Semver semver) { this.Root = semver; }
public override bool Equals(object obj) { return(obj switch { Semver sem => sem == this, _ => base.Equals(obj) });
public bool CompareTo(Semver y) { return(y >= Lower && y <= Higher); }
public InRangeComparison(Semver a, Semver b) { this.Lower = (a < b) ? a : b; this.Higher = (a > b) ? a : b; }