Skip to content

Commit

Permalink
feat: Add ZBPACK_SERVERLESS environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuanlin Lin committed Dec 28, 2023
1 parent 76c44f8 commit 610e8ef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions internal/nodejs/plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,11 @@ func getServerless(ctx *nodePlanContext) bool {
return false
}

zsEnv := os.Getenv("ZBPACK_SERVERLESS")
if zsEnv == "true" || zsEnv == "1" {
return true
}

sl := &ctx.Serverless

if serverless, err := sl.Take(); err == nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/zeaburpack/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ func Build(opt *BuildOptions) error {
return err
}

dotZeaburDirInOutput := path.Join(os.TempDir(), "zbpack/buildkit", "src/.zeabur")
dotZeaburDirInOutput := path.Join(os.TempDir(), "zbpack/buildkit", ".zeabur")

stat, err := os.Stat(dotZeaburDirInOutput)
if err == nil && stat.IsDir() {
Expand Down

0 comments on commit 610e8ef

Please sign in to comment.