create region via allocator so it survives until through make phase
All checks were successful
Generic zig build / build (push) Successful in 52s
All checks were successful
Generic zig build / build (push) Successful in 52s
This commit is contained in:
parent
a8a560a480
commit
91149957b5
|
@ -93,7 +93,8 @@ pub fn configureBuild(b: *std.Build, exe: *std.Build.Step.Compile, function_name
|
||||||
const iam_step = b.step("awslambda_iam", "Create/Get IAM role for function");
|
const iam_step = b.step("awslambda_iam", "Create/Get IAM role for function");
|
||||||
iam_step.dependOn(&iam.step);
|
iam_step.dependOn(&iam.step);
|
||||||
|
|
||||||
var region = @import("lambdabuild/Region.zig"){
|
const region = try b.allocator.create(@import("lambdabuild/Region.zig"));
|
||||||
|
region.* = .{
|
||||||
.allocator = b.allocator,
|
.allocator = b.allocator,
|
||||||
.specified_region = b.option([]const u8, "region", "Region to use [default is autodetect from environment/config]"),
|
.specified_region = b.option([]const u8, "region", "Region to use [default is autodetect from environment/config]"),
|
||||||
};
|
};
|
||||||
|
@ -104,7 +105,7 @@ pub fn configureBuild(b: *std.Build, exe: *std.Build.Step.Compile, function_name
|
||||||
.package = package_step.packagedFileLazyPath(),
|
.package = package_step.packagedFileLazyPath(),
|
||||||
.arch = exe.root_module.resolved_target.?.result.cpu.arch,
|
.arch = exe.root_module.resolved_target.?.result.cpu.arch,
|
||||||
.iam_step = iam,
|
.iam_step = iam,
|
||||||
.region = ®ion,
|
.region = region,
|
||||||
});
|
});
|
||||||
deploy.step.dependOn(&package_step.step);
|
deploy.step.dependOn(&package_step.step);
|
||||||
|
|
||||||
|
@ -118,7 +119,7 @@ pub fn configureBuild(b: *std.Build, exe: *std.Build.Step.Compile, function_name
|
||||||
const invoke = Invoke.create(b, .{
|
const invoke = Invoke.create(b, .{
|
||||||
.name = function_name,
|
.name = function_name,
|
||||||
.payload = payload,
|
.payload = payload,
|
||||||
.region = ®ion,
|
.region = region,
|
||||||
});
|
});
|
||||||
invoke.step.dependOn(&deploy.step);
|
invoke.step.dependOn(&deploy.step);
|
||||||
const run_step = b.step("awslambda_run", "Run the app in AWS lambda");
|
const run_step = b.step("awslambda_run", "Run the app in AWS lambda");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user