-
Notifications
You must be signed in to change notification settings - Fork 171
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
Add .fossa.yaml
parsing + example config file
#5
Conversation
cmd/fossa/config.go
Outdated
APIKey string `yaml:"api_key"` | ||
Server string | ||
} | ||
Analyze []struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would take advantage of the Module struct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think I agree. The configuration file is different enough (and will diverge enough) that I don't think it should use the same struct as the specific internal implementation of Module
.
Code should prefer expressing semantic intent over saving on typing.
.fossa.yaml
Outdated
api_key: some-key-here | ||
# server: https://fossa.on-prem | ||
|
||
analyze: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe rename to modules
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
.fossa.yaml
Outdated
# type: bowerpackage | ||
|
||
# These take a lot of inspiration from CircleCI | ||
# build: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's docker? the build env?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, for some foreseeable point in the future when we want to allow people to provide configuration to build on our agents. This is not meant for the CLI.
.fossa.yaml
Outdated
@@ -0,0 +1,25 @@ | |||
cli: | |||
api_key: some-key-here | |||
# server: https://fossa.on-prem |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we also need build repo opts like the project locator of the repo, so we can know what api endpoints to publish to
we somehow need to detect the revision of the CWD so we can build the full locator to publish to the api
fossa -l debug upload -k aa037953ac40cbbfbe321968297d302d --endpoint http://localhost:9578 --locator 'git+github.com/benjamn/recast$0297ae05d9ca5ae1aa5fc8a2b10262517f15cafe' '$(fossa -l debug build -t CommonJSPackage)'
<-- this is my working test cmd rn
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Be aware that the current built "locator" DOES NOT normalise the project URL.
Initial support for bundle show
Follow-up work: