@@ -27,6 +27,7 @@ public string GetCurrentVersion(ReleaseChannel rc) =>
2727 {
2828 ReleaseChannel . Stable => _data . Stable . ToString ( ) ,
2929 ReleaseChannel . Canary => _data . Canary . ToString ( ) ,
30+ ReleaseChannel . Custom1 => _data . Custom1 . ToString ( ) ,
3031 _ => throw new ArgumentOutOfRangeException ( )
3132 } ;
3233
@@ -39,6 +40,11 @@ public string GetNextVersion(ReleaseChannel rc, bool isMajorRelease = false) =>
3940 : _data . Stable . NextBuild ( )
4041 ) . ToString ( ) ,
4142 ReleaseChannel . Canary => _data . Canary . NextBuild ( ) . ToString ( ) , // canaries cannot move the major release, so ignore that boolean for this branch.
43+ ReleaseChannel . Custom1 => (
44+ isMajorRelease
45+ ? _data . Custom1 . NextMajor ( )
46+ : _data . Custom1 . NextBuild ( )
47+ ) . ToString ( ) ,
4248 _ => throw new ArgumentOutOfRangeException ( )
4349 } ;
4450
@@ -48,6 +54,7 @@ public VersionProvider.Entry IncrementBuild(ReleaseChannel rc)
4854 {
4955 ReleaseChannel . Stable => _data . Stable = _data . Stable . NextBuild ( ) ,
5056 ReleaseChannel . Canary => _data . Canary = _data . Canary . NextBuild ( ) ,
57+ ReleaseChannel . Custom1 => _data . Custom1 = _data . Custom1 . NextBuild ( ) ,
5158 _ => throw new ArgumentOutOfRangeException ( )
5259 } ;
5360
@@ -56,8 +63,8 @@ public VersionProvider.Entry IncrementBuild(ReleaseChannel rc)
5663 return entry ;
5764 }
5865
59- public void Advance ( )
66+ public void Advance ( ReleaseChannel rc )
6067 {
61- _data . IncrementAndReset ( ) ;
68+ _data . IncrementAndReset ( rc ) ;
6269 }
6370}
0 commit comments