Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor tutorial updates #20

Merged
merged 2 commits into from
Jan 12, 2023
Merged

Minor tutorial updates #20

merged 2 commits into from
Jan 12, 2023

Conversation

jspeed-meyers
Copy link
Contributor

  • Use go install, rather than go build
  • Use the go executable in the final command

Related to @rnjudge's issues with the current tutorial in issue #14

Use install, rather than build, and use executable
@jspeed-meyers jspeed-meyers mentioned this pull request Jan 12, 2023
tutorial.md Outdated Show resolved Hide resolved
@justinabrahms justinabrahms merged commit f10d97d into eBay:main Jan 12, 2023
@@ -64,5 +64,5 @@ Note: `sbom-scorecard` will guess the type if no type is specified.
To run `sbom-scorecard` and specify the output format as JSON, run:

```bash
go run cmd/sbom-scorecard/main.go score --outputFormat json examples/dropwizard.cyclonedx.json
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am only able to run sbom-scorecard tool using this go run command, even after running the go install command above.

rose@rose-vm:~/ternenv/sbom-scorecard$ go install cmd/sbom-scorecard/main.go
# bin directory properly created
rose@rose-vm:~/ternenv/sbom-scorecard$ ls ~/go/
bin/ pkg/

# try to run using sbom-scorecard command doesn't work
rose@rose-vm:~/ternenv/sbom-scorecard$ sbom-scorecard --help
sbom-scorecard: command not found

# using go run does
rose@rose-vm:~/ternenv/sbom-scorecard$ go run cmd/sbom-scorecard/main.go --help
sbom-scorecard evaluates the quality of the SBOM

Usage:
  sbom-scorecard [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  score       score evaluates the SBOM being passed and outputs based on the composition and completion

Flags:
  -h, --help   help for sbom-scorecard

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, if I call sbom-scorecard with main instead of sbom-scorecard, it works....?

rose@rose-vm:~/ternenv/sbom-scorecard$ go install cmd/sbom-scorecard/main.go
rose@rose-vm:~/ternenv/sbom-scorecard$ sbom-scorecard
sbom-scorecard: command not found
rose@rose-vm:~/ternenv/sbom-scorecard$ main
sbom-scorecard evaluates the quality of the SBOM

Usage:
  sbom-scorecard [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  score       score evaluates the SBOM being passed and outputs based on the composition and completion

Flags:
  -h, --help   help for sbom-scorecard

Use "sbom-scorecard [command] --help" for more information about a command.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good find. I'll fix up the docs and rearrange things so this works correctly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tracked here: #21

@justinabrahms
Copy link
Contributor

@rnjudge I'm guessing that the go/bin directory isn't on your path? Try:

export PATH=$PATH:$HOME/go/bin/

and see if it can find the sbom-scorecard binary then.

@rnjudge
Copy link

rnjudge commented Jan 12, 2023

@justinabrahms go/bin is in my path. does this look right?

rose@rose-vm:~/ternenv/sbom-scorecard$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/usr/local/go/bin:/home/rose/go/bin

but still no luck with scorecard command

@justinabrahms
Copy link
Contributor

justinabrahms commented Jan 12, 2023

@rnjudge Can you try this one?

go install github.com/ebay/sbom-scorecard/cmd/sbom-scorecard@latest

That should put an sbom-scorecard binary in the right spot.

(and yes, that path looks great)

@rnjudge
Copy link

rnjudge commented Jan 13, 2023

@justinabrahms that did it -- Thank you! Suggest adding that to the tutorial :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants