bitter-ability-32190
10/19/2022, 7:07 PMexternal_tool
target! https://github.com/pantsbuild/pants/pull/17277
If a picture is worth 1000 words, an example has to be worth something:
external_tool(
name="gh",
source=http_source(
url="<https://github.com/cli/cli/releases/download/v2.18.0/gh_2.18.0_linux_amd64.tar.gz>",
sha256="6b091b0b21ee8b0ec257920968905dc065505f5718e5a7de1e9d287320869ef8",
len=9230158
),
exe="gh_2.18.0_linux_amd64/bin/gh"
)
$ ./pants run //:gh -- --version
gh version 2.18.0 (2022-10-18)
<https://github.com/cli/cli/releases/tag/v2.18.0>
Now you can declare tools in that Pants will take care of downloading and sandboxing, and share those with your org. Or run them as part of other scripts. Have fun 😈http_source
supporting multi-arch/OScurved-television-6568
10/19/2022, 7:17 PMhttp_source
target as well…happy-kitchen-89482
10/19/2022, 7:43 PMbitter-ability-32190
10/19/2022, 7:44 PMbusy-vase-39202
10/19/2022, 8:07 PMwitty-crayon-22786
10/19/2022, 8:23 PMhttp_source
is going to be consumed in a target marked to run in a different environment
, then it should use that platform. so whatever syntax triggers cross platform needs to actually defer execution until codegen in order to get the “right” platform.http_source
, so not really specific to this target type.bitter-ability-32190
10/19/2022, 8:28 PMhigh-yak-85899
10/19/2022, 10:43 PMbitter-ability-32190
10/19/2022, 11:06 PM