Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update java build def to support remote execution #787

Merged
merged 5 commits into from Dec 10, 2019
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/remote/action.go
Expand Up @@ -54,9 +54,12 @@ func (c *Client) buildCommand(target *core.BuildTarget, inputRoot *pb.Directory,
}
// We can't predict what variables like this should be so we sneakily bung something on
// the front of the command. It'd be nicer if there were a better way though...
const commandPrefix = "export TMP_DIR=\"`pwd`\" && "
var commandPrefix = "export TMP_DIR=\"`pwd`\" && "
// TODO(peterebden): Remove this nonsense once API v2.1 is released.
files, dirs := outputs(target)
if len(target.Outputs()) == 1 { // $OUT is relative when running remotely; make it absolute
commandPrefix += "export OUT=\"$TMP_DIR/$OUT\" && "
henryaj marked this conversation as resolved.
Show resolved Hide resolved
}
cmd, err := core.ReplaceSequences(c.state, target, c.getCommand(target))
return &pb.Command{
Platform: c.platform,
Expand Down