File tree Expand file tree Collapse file tree 3 files changed +36
-14
lines changed Expand file tree Collapse file tree 3 files changed +36
-14
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,14 @@ class BuildCommand extends DartFrogCommand {
18
18
GeneratorBuilder ? generator,
19
19
}) : _ensureRuntimeCompatibility = ensureRuntimeCompatibility ??
20
20
runtime_compatibility.ensureRuntimeCompatibility,
21
- _generator = generator ?? MasonGenerator .fromBundle;
21
+ _generator = generator ?? MasonGenerator .fromBundle {
22
+ argParser.addOption (
23
+ 'dart-version' ,
24
+ defaultsTo: 'stable' ,
25
+ help: 'The Dart SDK version used to build the Dockerfile, defaults to'
26
+ ' stable.' ,
27
+ );
28
+ }
22
29
23
30
final void Function (Directory ) _ensureRuntimeCompatibility;
24
31
final GeneratorBuilder _generator;
@@ -34,7 +41,9 @@ class BuildCommand extends DartFrogCommand {
34
41
_ensureRuntimeCompatibility (cwd);
35
42
36
43
final generator = await _generator (dartFrogProdServerBundle);
37
- var vars = < String , dynamic > {};
44
+ var vars = < String , dynamic > {
45
+ 'dartVersion' : results['dart-version' ],
46
+ };
38
47
39
48
logger.detail ('[codegen] running pre-gen...' );
40
49
await generator.hooks.preGen (
You can’t perform that action at this time.
0 commit comments