Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion go/porcelain/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ func newFunctionFile(filePath string, i os.FileInfo, runtime string, metadata *F

var buf io.ReadWriter

if zipFile(i) {
if zipFile(i) || tarFile(i) {
buf = fileEntry
} else {
buf = new(bytes.Buffer)
Expand Down Expand Up @@ -961,6 +961,12 @@ func zipFile(i os.FileInfo) bool {
return filepath.Ext(i.Name()) == ".zip"
}

func tarFile(i os.FileInfo) bool {
name := i.Name()
ext := filepath.Ext(name)
return ext == ".tar" || ext == ".tgz" || strings.HasSuffix(name, ".tar.gz")
}

func jsFile(i os.FileInfo) bool {
return filepath.Ext(i.Name()) == ".js"
}
Expand Down
Loading