square-psychiatrist-19087
12/21/2024, 1:14 PMgifted-lunch-20593
12/21/2024, 1:23 PMenv
object. (env("PLATFORM")
, env("FOO_BAR")
), but you need to set it before running pants
square-psychiatrist-19087
12/21/2024, 1:27 PMgifted-lunch-20593
12/21/2024, 1:35 PMtarget(name="foo", option=make_option_foo())
target(name="bar", option=make_option_bar())
If you want to make multiple targets you can do it based on env:
for val in env('FOO').split(' '):
somehow_make_target(val)
square-psychiatrist-19087
12/21/2024, 1:38 PMgifted-lunch-20593
12/21/2024, 1:39 PMsquare-psychiatrist-19087
12/21/2024, 1:39 PMgifted-lunch-20593
12/21/2024, 1:40 PMconfig_setting
gifted-lunch-20593
12/21/2024, 1:40 PMsquare-psychiatrist-19087
12/21/2024, 1:40 PMgifted-lunch-20593
12/21/2024, 1:42 PMtarget(name="foo", option=select(conditionA="this", conditionB="and that"))
square-psychiatrist-19087
12/21/2024, 1:46 PMgifted-lunch-20593
12/21/2024, 2:28 PMdependencies
field based on output of other targets.
The best you can do, if you really need this functionality, is generating BUILD files using double-pass builds (first pass is generation based on Pants itself or some other scripts).square-psychiatrist-19087
12/21/2024, 5:13 PM