@@ -12,69 +12,89 @@ use toolchain::{
12
12
13
13
use crate :: util:: task:: { run_task, TaskOutputStyle } ;
14
14
15
+ /// Publish a new build from local files or a Docker image
15
16
#[ derive( Parser ) ]
16
17
pub struct Opts {
18
+ /// Name of the build to publish
17
19
#[ clap( index = 1 ) ]
18
20
name : String ,
19
21
22
+ /// Path to the files or directory to publish (must be a valid JS/TS file or directory with Dockerfile)
20
23
#[ clap( index = 2 ) ]
21
24
path : String ,
22
25
26
+ /// Specify the environment to publish to (will prompt if not specified)
23
27
#[ clap( long, alias = "env" , short = 'e' ) ]
24
28
environment : Option < String > ,
25
29
26
30
// Common options
31
+ /// Tags to apply to the build (key=value format)
27
32
#[ clap( long = "tags" , short = 't' ) ]
28
33
tags : Option < String > ,
29
34
35
+ /// Override the automatically generated version name
30
36
#[ clap(
31
37
long,
32
38
short = 'v' ,
33
39
help = "Override the automatically generated version name"
34
40
) ]
35
41
version : Option < String > ,
36
42
43
+ /// Control the access level for the build (public or private)
37
44
#[ clap( long) ]
38
45
access : Option < config:: BuildAccess > ,
39
46
47
+ /// Allow running container as root (unstable, Docker builds only)
40
48
#[ clap( long) ]
41
49
unstable_allow_root : bool ,
42
50
51
+ /// Specify the build method for Docker builds (unstable)
43
52
#[ clap( long) ]
44
53
unstable_build_method : Option < config:: build:: docker:: BuildMethod > ,
45
54
55
+ /// Specify the bundle kind for the build output (unstable)
46
56
#[ clap( long) ]
47
57
unstable_bundle : Option < config:: build:: docker:: BundleKind > ,
48
58
59
+ /// Specify the compression algorithm for the build output (unstable)
49
60
#[ clap( long) ]
50
61
unstable_compression : Option < config:: build:: Compression > ,
51
62
52
63
// Docker options
64
+ /// Specify a pre-built Docker image instead of building from a Dockerfile
53
65
#[ clap( long) ]
54
66
docker_image : Option < String > ,
55
67
68
+ /// Specify a custom Dockerfile path (relative to path)
56
69
#[ clap( long) ]
57
70
dockerfile : Option < String > ,
58
71
72
+ /// Specify a Docker build target for multi-stage builds
59
73
#[ clap( long) ]
60
74
build_target : Option < String > ,
61
75
76
+ /// Pass build arguments to Docker (key=value format)
62
77
#[ clap( long) ]
63
78
build_arg : Option < Vec < String > > ,
64
79
65
80
// JS options
81
+ /// Enable minification of JavaScript code (unstable)
66
82
#[ clap( long) ]
67
83
unstable_minify : Option < bool > ,
68
84
85
+ /// Enable result analysis for JavaScript builds (unstable)
69
86
#[ clap( long) ]
70
87
unstable_analyze_result : Option < bool > ,
71
88
89
+ /// Set the log level for esbuild (unstable)
72
90
#[ clap( long) ]
73
91
unstable_esbuild_log_level : Option < String > ,
74
92
93
+ /// Dump the build output for debugging (unstable)
75
94
#[ clap( long) ]
76
95
unstable_dump_build : Option < bool > ,
77
96
97
+ /// Skip bundling for JavaScript builds (unstable)
78
98
#[ clap( long) ]
79
99
unstable_no_bundler : Option < bool > ,
80
100
}
0 commit comments