Skip to content

Commit

Permalink
fix(build): fix locator and build output
Browse files Browse the repository at this point in the history
  • Loading branch information
xizhao committed Jan 26, 2018
1 parent 59eec8a commit f678cf0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cmd/fossa/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func setDefaultValues(c Config) (Config, error) {

// Load API key from environment variable.
if len(c.CLI.APIKey) == 0 {
c.CLI.APIKey = os.Getenv("FOSSA_CLI_API_KEY")
c.CLI.APIKey = os.Getenv("FOSSA_API_KEY")
}

// Infer default locator and project from `git`.
Expand All @@ -113,7 +113,7 @@ func setDefaultValues(c Config) (Config, error) {
if err != nil {
return c, err
}
c.CLI.Locator = project + "$" + revision.Hash().String()
c.CLI.Locator = "git+" + project + "$" + revision.Hash().String()
}

return c, nil
Expand Down
3 changes: 2 additions & 1 deletion cmd/fossa/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,12 @@ func BuildCmd(_ *cli.Context) {
if err != nil {
log.Logger.Fatalf("Could not upload build results: %s\n", err.Error())
}
fmt.Print("build & upload succeeded")
} else {
fmt.Print(string(build))
}

fmt.Println("BUILD OK")
log.Logger.Debug("BUILD OK")
}

func doBuild(config Config) ([]byte, error) {
Expand Down

0 comments on commit f678cf0

Please sign in to comment.