Closed damianoneill closed 4 years ago
Sure
but you'd need a new tagged version, right?
I'm unsure Frank, from the golicense homepage.
GitHub API: The license detected by golicense may be incorrect if a GitHub project changes licenses. golicense uses the GitHub API which only returns the license currently detected; we can't lookup licenses for specific commit hashes.
I'll try once you make the change and see if it works.
already pushed
Sorry, Frank, I've misinformed you. It looks like the naming doesn't affect the Github API call, LICENSE would be fine. I had mistakenly looked a number of working dependencies in my project and all of them were LICENSE.md.
The problem seems to be that it can't match a tag in the LICENSE file. It doesn't know what sort of LICENSE this is, so Github seems to be returning 'license not found or detected'. This is reflected in your project when you look at the top right corner of the github page, it shows View License, instead of naming a specific License.
I suspect the only way to 'fix' this is to update the LICENSE file contents.
Again sorry that I misinformed you.
Damian.
This is the code that makes the call.
https://github.com/mitchellh/golicense/blob/master/license/github/repo_api.go
No problem. I can fix the license to make sure that it is recognized.
Can you try again?
Worked prefectly
$ golicense .approved-licenses.json /Users/doneill/go/bin/am
✅ github.com/mitchellh/go-homedir MIT License
⚠️ github.com/magiconair/properties BSD 2-Clause "Simplified" License
✅ github.com/spf13/cobra Apache License 2.0
Thankyou.
would it be possible to rename the license file to LICENSE.md so that it can be picked up by https://github.com/mitchellh/golicense
Thanks, Damian.