Quellcode durchsuchen

Merge pull request #1487 from porter-dev/nafees/heroku-bp-procfile-hotfix

[hotfix] Always use the heroku procfile buildpack with the heroku builder
abelanger5 vor 4 Jahren
Ursprung
Commit
0a2eb16bc6
1 geänderte Dateien mit 5 neuen und 0 gelöschten Zeilen
  1. 5 0
      cli/cmd/pack/pack.go

+ 5 - 0
cli/cmd/pack/pack.go

@@ -4,6 +4,7 @@ import (
 	"context"
 	"fmt"
 	"path/filepath"
+	"strings"
 
 	"github.com/buildpacks/pack"
 	"github.com/porter-dev/porter/api/types"
@@ -46,5 +47,9 @@ func (a *Agent) Build(opts *docker.BuildOpts, buildConfig *types.BuildConfig) er
 		// FIXME: use all the config vars
 	}
 
+	if strings.HasPrefix(buildOpts.Builder, "heroku") {
+		buildOpts.Buildpacks = append(buildOpts.Buildpacks, "heroku/procfile")
+	}
+
 	return client.Build(context, buildOpts)
 }