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);
     }));
 }
Beispiel #2
0
 public bool CompareTo(Semver y)
 {
     return(Root.Major == y.Major && y.Minor > Root.Minor);
 }
Beispiel #3
0
 public bool CompareTo(Semver y)
 {
     return(y <= Root);
 }
Beispiel #4
0
 public GreaterMinorRevisionComparison(Semver semver)
 {
     this.Root = semver;
 }
Beispiel #5
0
 public LessEqualComparison(Semver semver)
 {
     this.Root = semver;
 }
Beispiel #6
0
 public GreaterEqualComparison(Semver semver)
 {
     this.Root = semver;
 }
Beispiel #7
0
 public override bool Equals(object obj)
 {
     return(obj switch {
         Semver sem => sem == this,
         _ => base.Equals(obj)
     });
Beispiel #8
0
 public bool CompareTo(Semver y)
 {
     return(y >= Lower && y <= Higher);
 }
Beispiel #9
0
 public InRangeComparison(Semver a, Semver b)
 {
     this.Lower  = (a < b) ? a : b;
     this.Higher = (a > b) ? a : b;
 }