pulumi/sdk/go/common
Michael Bridgen aec158fd2d Allow a path to a file when cons'ing an archive
It's legitimate to construct an archive with a single file (rather than
a directory) by mentioning the file's name:

    zip handler.zip handler/main

In fact, that's what the AWS Lambda docs suggest:
https://docs.aws.amazon.com/lambda/latest/dg/golang-package.html

This commit lets you do the equivalent when making an
`asset.FileArchive`. It needs a little rearrangement of
directoryArchiveReader so that the individual paths are relative to a
base rather than sharing a prefix; otherwise, a single-file archive (in
which the name is the entire file path) cannot be constructed. I've
sign-posted this change by renaming the helper struct in question to
`filesystemArchiveReader`.

Signed-off-by: Michael Bridgen <mbridgen@pulumi.com>
2022-06-10 17:50:40 +01:00
..
apitype Revert "Strip Aliases from state (#9275)" (#9282) 2022-03-24 20:08:18 +01:00
constant expose execution kind via update metadata (#5258) 2020-08-31 09:07:59 -07:00
diag Ensure that FormatOptions.Color is set before use in diag.defaultSink (#9334) 2022-04-01 20:22:35 +01:00
encoding Add gzip flag to filestate backend (#9610) 2022-05-23 12:13:21 -07:00
resource Allow a path to a file when cons'ing an archive 2022-06-10 17:50:40 +01:00
testing ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00
tokens Update tokens.Name to match what's actually in the service (#9163) 2022-03-11 17:06:18 +00:00
tools Toward replacing MSBuild with make+bash on Windows (#8617) 2022-01-07 22:27:14 -05:00
util Poll gRPC healthchecks to auto-cancel sub-processes (#9735) 2022-06-06 13:28:00 +01:00
version move pkg/version -> sdk/go/common/version 2020-03-18 15:25:25 -07:00
workspace Revert "Clone and test pulumi/templates from the current working branch (#9804)" (#9831) 2022-06-10 11:39:54 +01:00