@@ -153,21 +153,13 @@ Standard Schema Family (SemVer):
153153 standard-base-prerelease-post-context - 1.1.0-alpha.1.post.2+main.2.a1b2c3d
154154 standard-base-prerelease-post-dev-context - 1.1.0-alpha.1.post.2.dev.1729924622+main.2.a1b2c3d
155155 standard-context - Smart auto-detection with build context
156-
157- CalVer Schema Family:
158- calver - Smart auto-detection based on repository state (clean/dirty/distance)
159- calver-base - 2024.11.03
160- calver-base-prerelease - 2024.11.03-alpha.1
161- calver-base-prerelease-post - 2024.11.03-alpha.1.post.2
162- calver-base-prerelease-post-dev - 2024.11.03-alpha.1.post.2.dev.1729924622
163- calver-base-context - 2024.11.03+main.2.a1b2c3d
164- calver-base-prerelease-context - 2024.11.03-alpha.1+main.2.a1b2c3d
165- calver-base-prerelease-post-context - 2024.11.03-alpha.1.post.2+main.2.a1b2c3d
166- calver-base-prerelease-post-dev-context - 2024.11.03-alpha.1.post.2.dev.1729924622+main.2.a1b2c3d
167- calver-context - Smart auto-detection with build context
168156"
169157 ) ]
170158 pub schema : Option < String > ,
159+
160+ /// Custom RON schema definition
161+ #[ arg( long, help = "Custom schema in RON format" ) ]
162+ pub schema_ron : Option < String > ,
171163}
172164
173165impl Default for FlowArgs {
@@ -179,6 +171,7 @@ impl Default for FlowArgs {
179171 overrides : OverridesConfig :: default ( ) ,
180172 hash_branch_len : 5 ,
181173 schema : None ,
174+ schema_ron : None ,
182175 }
183176 }
184177}
@@ -213,6 +206,7 @@ mod tests {
213206 assert ! ( args. branch_config. pre_release_num. is_none( ) ) ;
214207 assert_eq ! ( args. branch_config. post_mode, None ) ;
215208 assert ! ( args. schema. is_none( ) ) ; // Default is None (will use standard schema)
209+ assert ! ( args. schema_ron. is_none( ) ) ; // Default is None
216210 assert ! ( args. overrides. common. bumped_branch. is_none( ) ) ; // Default is None (use detected branch)
217211 }
218212
@@ -247,6 +241,19 @@ mod tests {
247241 assert_eq ! ( args. output. output_prefix, Some ( "v" . to_string( ) ) ) ;
248242 assert ! ( args. validate( & mock_zerv( ) ) . is_ok( ) ) ;
249243 }
244+
245+ #[ test]
246+ fn test_flow_args_with_schema_ron ( ) {
247+ let ron_schema = "core: [{var: \" major\" }]" ;
248+ let mut args = FlowArgs {
249+ schema : None ,
250+ schema_ron : Some ( ron_schema. to_string ( ) ) ,
251+ ..FlowArgs :: default ( )
252+ } ;
253+ assert ! ( args. schema. is_none( ) ) ;
254+ assert_eq ! ( args. schema_ron, Some ( ron_schema. to_string( ) ) ) ;
255+ assert ! ( args. validate( & mock_zerv( ) ) . is_ok( ) ) ;
256+ }
250257 }
251258
252259 mod error_cases {
0 commit comments