forked from lobo/lambda-zig
		
	create region via allocator so it survives until through make phase
This commit is contained in:
		
							parent
							
								
									a8a560a480
								
							
						
					
					
						commit
						91149957b5
					
				
					 1 changed files with 4 additions and 3 deletions
				
			
		|  | @ -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"); | ||||
|     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, | ||||
|         .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(), | ||||
|         .arch = exe.root_module.resolved_target.?.result.cpu.arch, | ||||
|         .iam_step = iam, | ||||
|         .region = ®ion, | ||||
|         .region = region, | ||||
|     }); | ||||
|     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, .{ | ||||
|         .name = function_name, | ||||
|         .payload = payload, | ||||
|         .region = ®ion, | ||||
|         .region = region, | ||||
|     }); | ||||
|     invoke.step.dependOn(&deploy.step); | ||||
|     const run_step = b.step("awslambda_run", "Run the app in AWS lambda"); | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue