Skip to content

Commit

Permalink
feat: add debug option
Browse files Browse the repository at this point in the history
turn off debug mode by default, and add a param to turn it back on
  • Loading branch information
justenwalker committed Mar 28, 2021
1 parent 59ae06c commit ca0dd08
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ public String compileOnHost() throws java.lang.Exception {
cmd.add(os);
cmd.add("-arch");
cmd.add(arch);
cmd.add("-debug");
if (params.debug) {
cmd.add("-debug");
}
cmd.add("-dir");
cmd.add(config.workingDirectory().toString());
cmd.add("-out");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public class TaskParams {

public static final String DIRECTORY_KEY = "dir";

public static final String DEBUG_KEY = "debug";

public static final String USE_DOCKER_IMAGE_KEY = "useDocker";

public static final String INSTALL_GO_KEY = "installGo";
Expand Down Expand Up @@ -81,6 +83,8 @@ public class TaskParams {

public boolean installGo;

public boolean debug;

public String goVersion;

public TaskParams() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ private TaskParams makeParams(Context ctx) {
params.goVersion = defaultString(ctx, GO_VERSION_KEY);
params.installGo = defaultBool(ctx, INSTALL_GO_KEY, true);
params.useDockerImage = defaultBool(ctx, USE_DOCKER_IMAGE_KEY, false);
params.debug = defaultBool(ctx, DEBUG_KEY, false);
params.flowBinary = defaultString(ctx, BINARY_KEY);
params.flowDirectory = defaultString(ctx, DIRECTORY_KEY);
params.taskName = defaultString(ctx, TASK_NAME_KEY);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ private TaskParams makeParams(Variables input) {
params.goVersion = defaultString(input, GO_VERSION_KEY);
params.installGo = defaultBool(input, INSTALL_GO_KEY, false);
params.useDockerImage = defaultBool(input, USE_DOCKER_IMAGE_KEY, true);
params.debug = defaultBool(input, DEBUG_KEY, false);
params.flowBinary = defaultString(input, BINARY_KEY);
params.flowDirectory = defaultString(input, DIRECTORY_KEY);
params.taskName = defaultString(input, TASK_NAME_KEY);
Expand Down

0 comments on commit ca0dd08

Please sign in to comment.