Skip to content

Commit

Permalink
Commit SDK for Renovate
Browse files Browse the repository at this point in the history
  • Loading branch information
pulumi-bot committed Dec 27, 2024
1 parent b1fa7cd commit df10dea
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 25 deletions.
7 changes: 7 additions & 0 deletions sdk/dotnet/Local/Run.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ public static Task<RunResult> InvokeAsync(RunArgs args, InvokeOptions? options =
/// </summary>
public static Output<RunResult> Invoke(RunInvokeArgs args, InvokeOptions? options = null)
=> global::Pulumi.Deployment.Instance.Invoke<RunResult>("command:local:run", args ?? new RunInvokeArgs(), options.WithDefaults());

/// <summary>
/// A local command to be executed.
/// This command will always be run on any preview or deployment. Use `local.Command` to avoid duplicating executions.
/// </summary>
public static Output<RunResult> Invoke(RunInvokeArgs args, InvokeOutputOptions options)
=> global::Pulumi.Deployment.Instance.Invoke<RunResult>("command:local:run", args ?? new RunInvokeArgs(), options.WithDefaults());
}


Expand Down
7 changes: 7 additions & 0 deletions sdk/dotnet/Utilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ static class Utilities
return dst;
}

public static global::Pulumi.InvokeOutputOptions WithDefaults(this global::Pulumi.InvokeOutputOptions? src)
{
var dst = src ?? new global::Pulumi.InvokeOutputOptions{};
dst.Version = src?.Version ?? Version;
return dst;
}

private readonly static string version;
public static string Version => version;

Expand Down
2 changes: 1 addition & 1 deletion sdk/dotnet/pulumi-plugin.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"resource": true,
"name": "command",
"version": "1.0.0-alpha.0+dev"
"version": "1.1.0-alpha.1735343232+5a82aa6"
}
17 changes: 3 additions & 14 deletions sdk/go/command/local/run.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdk/go/command/pulumi-plugin.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"resource": true,
"name": "command",
"version": "1.0.0-alpha.0+dev"
"version": "1.1.0-alpha.1735343232+5a82aa6"
}
31 changes: 22 additions & 9 deletions sdk/java/src/main/java/com/pulumi/command/Utilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import javax.annotation.Nullable;
import com.pulumi.core.internal.Environment;
import com.pulumi.deployment.InvokeOptions;
import com.pulumi.deployment.InvokeOutputOptions;

public class Utilities {

Expand Down Expand Up @@ -57,16 +58,28 @@ public static Optional<java.lang.Double> getEnvDouble(java.lang.String... names)
return Optional.empty();
}

public static InvokeOptions withVersion(@Nullable InvokeOptions options) {
if (options != null && options.getVersion().isPresent()) {
return options;
}
return new InvokeOptions(
options == null ? null : options.getParent().orElse(null),
options == null ? null : options.getProvider().orElse(null),
getVersion()
);
public static InvokeOptions withVersion(@Nullable InvokeOptions options) {
if (options != null && options.getVersion().isPresent()) {
return options;
}
return new InvokeOptions(
options == null ? null : options.getParent().orElse(null),
options == null ? null : options.getProvider().orElse(null),
getVersion()
);
}

public static InvokeOutputOptions withVersion(@Nullable InvokeOutputOptions options) {
if (options != null && options.getVersion().isPresent()) {
return options;
}
return new InvokeOutputOptions(
options == null ? null : options.getParent().orElse(null),
options == null ? null : options.getProvider().orElse(null),
getVersion(),
options == null ? null : options.getDependsOn()
);
}

private static final java.lang.String version;
public static java.lang.String getVersion() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.pulumi.core.TypeShape;
import com.pulumi.deployment.Deployment;
import com.pulumi.deployment.InvokeOptions;
import com.pulumi.deployment.InvokeOutputOptions;
import java.util.concurrent.CompletableFuture;

public final class LocalFunctions {
Expand Down Expand Up @@ -38,6 +39,14 @@ public static CompletableFuture<RunResult> runPlain(RunPlainArgs args) {
public static Output<RunResult> run(RunArgs args, InvokeOptions options) {
return Deployment.getInstance().invoke("command:local:run", TypeShape.of(RunResult.class), args, Utilities.withVersion(options));
}
/**
* A local command to be executed.
* This command will always be run on any preview or deployment. Use `local.Command` to avoid duplicating executions.
*
*/
public static Output<RunResult> run(RunArgs args, InvokeOutputOptions options) {
return Deployment.getInstance().invoke("command:local:run", TypeShape.of(RunResult.class), args, Utilities.withVersion(options));
}
/**
* A local command to be executed.
* This command will always be run on any preview or deployment. Use `local.Command` to avoid duplicating executions.
Expand Down

0 comments on commit df10dea

Please sign in to comment.