Skip to content

Commit

Permalink
feat: Add --gen2 support (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
pabloperich authored Dec 1, 2022
1 parent 64ead93 commit 3b7b701
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,12 @@ public class DeployFunction extends CloudSdkMojo {
*/
@Parameter(alias = "deploy.buildenvvarsfile", property = "function.deploy.buildenvvarsfile")
String buildEnvVarsFile;

/**
* If true, deploys the function in the 2nd Generation Environment.
*/
@Parameter(alias = "deploy.gen2", property = "function.deploy.gen2", defaultValue = "false")
boolean gen2;

boolean hasEnvVariables() {
return (this.environmentVariables != null && !this.environmentVariables.isEmpty());
}
Expand Down Expand Up @@ -287,6 +292,9 @@ public List<String> getCommands() {
commands.add("functions");
commands.add("deploy");
commands.add(name);
if (gen2) {
commands.add("--gen2");
}
if (region != null) {
commands.add("--region=" + region);
}
Expand Down

0 comments on commit 3b7b701

Please sign in to comment.