Skip to content

Commit b041a0f

Browse files
committed
fix: upload non-zisi-compiled files as provided.al2
1 parent 2d4ead2 commit b041a0f

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

go/porcelain/deploy.go

+2-9
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ func bundle(ctx context.Context, functionDir string, observer DeployObserver) (*
746746
}
747747
functions.Add(file.Name, file)
748748
case goFile(filePath, i, observer):
749-
file, err := newFunctionFile(filePath, i, goRuntime, nil, observer)
749+
file, err := newFunctionFile(filePath, i, amazonLinux2, nil, observer)
750750
if err != nil {
751751
return nil, nil, nil, err
752752
}
@@ -975,14 +975,7 @@ func ignoreFile(rel string, ignoreInstallDirs bool) bool {
975975
}
976976

977977
func createHeader(archive *zip.Writer, i os.FileInfo, runtime string) (io.Writer, error) {
978-
if runtime == goRuntime {
979-
return archive.CreateHeader(&zip.FileHeader{
980-
CreatorVersion: 3 << 8, // indicates Unix
981-
ExternalAttrs: 0777 << 16, // -rwxrwxrwx file permissions
982-
Name: i.Name(),
983-
Method: zip.Deflate,
984-
})
985-
} else if runtime == amazonLinux2 {
978+
if runtime == goRuntime || runtime == amazonLinux2 {
986979
return archive.CreateHeader(&zip.FileHeader{
987980
CreatorVersion: 3 << 8, // indicates Unix
988981
ExternalAttrs: 0777 << 16, // -rwxrwxrwx file permissions

0 commit comments

Comments
 (0)