File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,20 @@ enum Cmd {
147147 #[ clap( long) ]
148148 base : String ,
149149 } ,
150+
151+ /// Shows the patch directory for a given product version
152+ PatchDir {
153+ #[ clap( flatten) ]
154+ pv : ProductVersion ,
155+ } ,
156+
157+ /// Shows the worktree directory for a given product version
158+ ///
159+ /// This is the same value as `cargo patchable checkout` returns, but does not perform a checkout.
160+ WorktreeDir {
161+ #[ clap( flatten) ]
162+ pv : ProductVersion ,
163+ } ,
150164}
151165
152166#[ derive( Debug , Snafu ) ]
@@ -411,6 +425,22 @@ fn main() -> Result<()> {
411425 "created configuration for product version"
412426 ) ;
413427 }
428+
429+ Cmd :: PatchDir { pv } => {
430+ let ctx = ProductVersionContext {
431+ pv,
432+ images_repo_root,
433+ } ;
434+ println ! ( "{}" , ctx. patch_dir( ) . display( ) ) ;
435+ }
436+
437+ Cmd :: WorktreeDir { pv } => {
438+ let ctx = ProductVersionContext {
439+ pv,
440+ images_repo_root,
441+ } ;
442+ println ! ( "{}" , ctx. worktree_root( ) . display( ) ) ;
443+ }
414444 }
415445
416446 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments