please icon indicating copy to clipboard operation
please copied to clipboard

Add `--out` flag to `plz build`

Open Tatskaari opened this issue 2 years ago • 3 comments

It would be useful to have a --out flag e.g. plz build --out ./dir //src:please to copy plz-out/bin/src/please to ./dir/please.

When set, the build subcommand would loop through all the original targets i.e. state.ExpandOriginalLabels(). copying their outputs to the given directory:

for _, target := range state.ExpandOriginalLabels() {
	outs := state.Graph.TargetOrDie(target).FullOutputs()
        // copy the outs
}

Tatskaari avatar Oct 16 '23 12:10 Tatskaari

I might argue for the name being --out_dir to be clearer about what it'll do. Like the idea otherwise though!

peterebden avatar Oct 16 '23 14:10 peterebden

Hey, happy to work on this if you can assign it to me

DefinitelyNotBen avatar Oct 17 '23 09:10 DefinitelyNotBen

Hey, happy to work on this if you can assign it to me

I'm afraid I can't assign it to you if you're not part of the org, but please do have a crack!

Tatskaari avatar Oct 17 '23 10:10 Tatskaari

Closed by #2950

samwestmoreland avatar Jun 08 '24 19:06 samwestmoreland