diff options
author | John Olheiser <john.olheiser@gmail.com> | 2023-01-29 09:49:51 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-29 09:49:51 -0600 |
commit | 2052a9e2b4e17704849e0968762ad7d51fe9d7b7 (patch) | |
tree | 67e5bd1921e3c82308d504990fe77fc79920e89c /build | |
parent | e88b529b31696331393e29561bab3c60bf876ee7 (diff) | |
download | gitea-2052a9e2b4e17704849e0968762ad7d51fe9d7b7.tar.gz gitea-2052a9e2b4e17704849e0968762ad7d51fe9d7b7.zip |
Consume hcaptcha and pwn deps (#22610)
This PR just consumes the
[hcaptcha](https://gitea.com/jolheiser/hcaptcha) and
[haveibeenpwned](https://gitea.com/jolheiser/pwn) modules directly into
Gitea.
Also let this serve as a notice that I'm fine with transferring my
license (which was already MIT) from my own name to "The Gitea Authors".
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Diffstat (limited to 'build')
-rw-r--r-- | build/generate-go-licenses.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/build/generate-go-licenses.go b/build/generate-go-licenses.go index ec8fc82a71..7dd1ba38b4 100644 --- a/build/generate-go-licenses.go +++ b/build/generate-go-licenses.go @@ -9,6 +9,7 @@ import ( "encoding/json" "io/fs" "os" + goPath "path" "path/filepath" "regexp" "sort" @@ -47,13 +48,15 @@ func main() { entries := []LicenseEntry{} for _, path := range paths { + path := filepath.ToSlash(path) + licenseText, err := os.ReadFile(path) if err != nil { panic(err) } - path := strings.Replace(path, base+string(os.PathSeparator), "", 1) - name := filepath.Dir(path) + path = strings.Replace(path, base+"/", "", 1) + name := goPath.Dir(path) // There might be a bug somewhere in go-licenses that sometimes interprets the // root package as "." and sometimes as "code.gitea.io/gitea". Workaround by |