@@ -10,9 +10,9 @@ import (
1010 "strings"
1111 "time"
1212
13- "code.google.com/p/go-uuid/uuid"
1413 "github.com/deis/builder/pkg"
1514 "github.com/deis/builder/pkg/gitreceive/log"
15+ "github.com/pborman/uuid"
1616 "gopkg.in/yaml.v2"
1717)
1818
@@ -123,18 +123,22 @@ func build(conf *Config, builderKey, gitSha string) error {
123123 return fmt .Errorf ("running %s (%s)" , strings .Join (tarCmd .Args , " " ), err )
124124 }
125125
126- usingDockerfile := true
127- rawProcFile , err := ioutil .ReadFile (fmt .Sprintf ("%s/Procfile" , tmpDir ))
128- if err == nil {
129- usingDockerfile = false
130- }
126+ bType := getBuildTypeForDir (tmpDir )
127+ usingDockerfile := bType == buildTypeDockerfile
128+
131129 var procType pkg.ProcessType
132- if err := yaml .Unmarshal (rawProcFile , & procType ); err != nil {
133- return fmt .Errorf ("procfile %s/ProcFile is malformed (%s)" , tmpDir , err )
130+ if bType == buildTypeProcfile {
131+ rawProcFile , err := ioutil .ReadFile (fmt .Sprintf ("%s/Procfile" , tmpDir ))
132+ if err != nil {
133+ return fmt .Errorf ("reading %s/Procfile" , tmpDir )
134+ }
135+ if err := yaml .Unmarshal (rawProcFile , & procType ); err != nil {
136+ return fmt .Errorf ("procfile %s/ProcFile is malformed (%s)" , tmpDir , err )
137+ }
134138 }
135139
136140 var srcManifest string
137- if err == os . ErrNotExist {
141+ if creds == nil {
138142 // both key and secret are missing, proceed with no credentials
139143 if usingDockerfile {
140144 srcManifest = "/etc/deis-dockerbuilder-no-creds.yaml"
0 commit comments