Mohammed Nafees 4 роки тому
батько
коміт
bd6c120073

+ 0 - 6
internal/integrations/buildpacks/go.go

@@ -1,7 +1,6 @@
 package buildpacks
 
 import (
-	"fmt"
 	"sync"
 
 	"github.com/google/go-github/github"
@@ -74,11 +73,8 @@ func (runtime *goRuntime) Detect(
 		bool
 	}, 2)
 
-	fmt.Printf("Starting detection for a Go runtime for %s/%s\n", owner, name)
 	runtime.wg.Add(2)
-	fmt.Println("Checking for go-mod")
 	go runtime.detectMod(results, directoryContent)
-	fmt.Println("Checking for dep")
 	go runtime.detectDep(results, directoryContent)
 	runtime.wg.Wait()
 	close(results)
@@ -93,13 +89,11 @@ func (runtime *goRuntime) Detect(
 	}
 
 	if len(results) == 0 {
-		fmt.Printf("No Go runtime detected for %s/%s\n", owner, name)
 		paketo.Others = append(paketo.Others, paketoBuildpackInfo)
 		heroku.Others = append(heroku.Others, herokuBuildpackInfo)
 		return nil
 	}
 
-	fmt.Printf("Go runtime detected for %s/%s\n", owner, name)
 	paketo.Detected = append(paketo.Detected, paketoBuildpackInfo)
 	heroku.Detected = append(heroku.Detected, herokuBuildpackInfo)
 

+ 0 - 6
internal/integrations/buildpacks/nodejs.go

@@ -169,13 +169,9 @@ func (runtime *nodejsRuntime) Detect(
 		bool
 	}, 3)
 
-	fmt.Printf("Starting detection for a NodeJS runtime for %s/%s\n", owner, name)
 	runtime.wg.Add(3)
-	fmt.Println("Checking for yarn")
 	go runtime.detectYarn(results, directoryContent)
-	fmt.Println("Checking for NPM")
 	go runtime.detectNPM(results, directoryContent)
-	fmt.Println("Checking for NodeJS standalone")
 	go runtime.detectStandalone(results, directoryContent)
 	runtime.wg.Wait()
 	close(results)
@@ -190,7 +186,6 @@ func (runtime *nodejsRuntime) Detect(
 	}
 
 	if len(results) == 0 {
-		fmt.Printf("No NodeJS runtime detected for %s/%s\n", owner, name)
 		paketo.Others = append(paketo.Others, paketoBuildpackInfo)
 		heroku.Others = append(heroku.Others, herokuBuildpackInfo)
 		return nil
@@ -211,7 +206,6 @@ func (runtime *nodejsRuntime) Detect(
 
 	if foundYarn || foundNPM {
 		// it is safe to assume that the project contains a package.json
-		fmt.Println("package.json file detected")
 		fileContent, _, _, err := client.Repositories.GetContents(
 			context.Background(),
 			owner,

+ 0 - 7
internal/integrations/buildpacks/python.go

@@ -1,7 +1,6 @@
 package buildpacks
 
 import (
-	"fmt"
 	"strings"
 	"sync"
 
@@ -120,15 +119,10 @@ func (runtime *pythonRuntime) Detect(
 		bool
 	}, 4)
 
-	fmt.Printf("Starting detection for a Python runtime for %s/%s\n", owner, name)
 	runtime.wg.Add(4)
-	fmt.Println("Checking for pipenv")
 	go runtime.detectPipenv(results, directoryContent)
-	fmt.Println("Checking for pip")
 	go runtime.detectPip(results, directoryContent)
-	fmt.Println("Checking for conda")
 	go runtime.detectConda(results, directoryContent)
-	fmt.Println("Checking for Python standalone")
 	go runtime.detectStandalone(results, directoryContent)
 	runtime.wg.Wait()
 	close(results)
@@ -143,7 +137,6 @@ func (runtime *pythonRuntime) Detect(
 	}
 
 	if len(results) == 0 {
-		fmt.Printf("No Python runtime detected for %s/%s\n", owner, name)
 		paketo.Others = append(paketo.Others, paketoBuildpackInfo)
 		heroku.Others = append(heroku.Others, herokuBuildpackInfo)
 		return nil

+ 0 - 13
internal/integrations/buildpacks/ruby.go

@@ -125,13 +125,11 @@ func (runtime *rubyRuntime) detectRackup(
 	fileContent, _, _, err := client.Repositories.GetContents(context.Background(),
 		owner, name, "Gemfile.lock", &repoContentOptions)
 	if err != nil {
-		fmt.Printf("Error fetching contents of Gemfile.lock for %s/%s: %v\n", owner, name, err)
 		runtime.wg.Done()
 		return
 	}
 	gemfileLockContent, err := fileContent.GetContent()
 	if err != nil {
-		fmt.Printf("Error calling GetContent() on Gemfile.lock for %s/%s: %v\n", owner, name, err)
 		runtime.wg.Done()
 		return
 	}
@@ -188,8 +186,6 @@ func (runtime *rubyRuntime) Detect(
 	repoContentOptions github.RepositoryContentGetOptions,
 	paketo, heroku *BuilderInfo,
 ) error {
-	fmt.Printf("Starting detection for a Ruby runtime for %s/%s\n", owner, name)
-
 	gemfileFound := false
 	gemfileLockFound := false
 	configRuFound := false
@@ -217,7 +213,6 @@ func (runtime *rubyRuntime) Detect(
 	}
 
 	if !gemfileFound {
-		fmt.Printf("No Ruby runtime detected for %s/%s\n", owner, name)
 		paketo.Others = append(paketo.Others, paketoBuildpackInfo)
 		heroku.Others = append(heroku.Others, herokuBuildpackInfo)
 		return nil
@@ -253,16 +248,12 @@ func (runtime *rubyRuntime) Detect(
 		bool
 	}, count)
 
-	fmt.Printf("Starting detection for a Ruby runtime for %s/%s\n", owner, name)
 	runtime.wg.Add(count)
-	fmt.Println("Checking for puma")
 	go runtime.detectPuma(gemfileContent, results)
-	fmt.Println("Checking for thin")
 	go runtime.detectThin(gemfileContent, results)
 	if configRuFound {
 		{
 			// FIXME: find a better, more readable way of doing this
-			fmt.Printf("Ruby rackup runtime detected for %s/%s\n", owner, name)
 			results <- struct {
 				string
 				bool
@@ -270,17 +261,13 @@ func (runtime *rubyRuntime) Detect(
 			runtime.wg.Done()
 		}
 
-		fmt.Println("Checking for unicorn")
 		go runtime.detectUnicorn(gemfileContent, results)
 	}
-	fmt.Println("Checking for passenger")
 	go runtime.detectPassenger(gemfileContent, results)
 	if !configRuFound && gemfileLockFound {
-		fmt.Println("Checking for rackup")
 		go runtime.detectRackup(client, owner, name, repoContentOptions, results)
 	}
 	if rakefileFound {
-		fmt.Println("Checking for rake")
 		go runtime.detectRake(gemfileContent, results)
 	}
 	runtime.wg.Wait()