diff --git a/docs/LICENSE_OF_DEPENDENCIES.md b/docs/LICENSE_OF_DEPENDENCIES.md index 3ba6ad7b1..37a66068c 100644 --- a/docs/LICENSE_OF_DEPENDENCIES.md +++ b/docs/LICENSE_OF_DEPENDENCIES.md @@ -9,7 +9,6 @@ following works: - collectd.org [ISC License](https://github.com/collectd/go-collectd/blob/master/LICENSE) - dario.cat/mergo [BSD 3-Clause "New" or "Revised" License](https://github.com/imdario/mergo/blob/master/LICENSE) - filippo.io/edwards25519 [BSD 3-Clause "New" or "Revised" License](https://github.com/FiloSottile/edwards25519/blob/main/LICENSE) -- github.com/99designs/go-keychain [MIT License](https://github.com/99designs/go-keychain/blob/master/LICENSE) - github.com/99designs/keyring [MIT License](https://github.com/99designs/keyring/blob/master/LICENSE) - github.com/Azure/azure-amqp-common-go [MIT License](https://github.com/Azure/azure-amqp-common-go/blob/master/LICENSE) - github.com/Azure/azure-event-hubs-go [MIT License](https://github.com/Azure/azure-event-hubs-go/blob/master/LICENSE) @@ -149,7 +148,6 @@ following works: - github.com/gabriel-vasile/mimetype [MIT License](https://github.com/gabriel-vasile/mimetype/blob/master/LICENSE) - github.com/go-asn1-ber/asn1-ber [MIT License](https://github.com/go-asn1-ber/asn1-ber/blob/v1.3/LICENSE) - github.com/go-chi/chi [MIT License](https://github.com/go-chi/chi/blob/master/LICENSE) -- github.com/go-darwin/apfs [BSD 3-Clause "New" or "Revised" License](https://github.com/go-darwin/apfs/blob/main/LICENSE) - github.com/go-faster/city [MIT License](https://github.com/go-faster/city/blob/main/LICENSE) - github.com/go-faster/errors [BSD 3-Clause "New" or "Revised" License](https://github.com/go-faster/errors/blob/main/LICENSE) - github.com/go-git/go-billy [Apache License 2.0](https://github.com/go-git/go-billy/blob/master/LICENSE) diff --git a/scripts/check-deps.sh b/scripts/check-deps.sh index 980eb0667..3aa0b46ed 100755 --- a/scripts/check-deps.sh +++ b/scripts/check-deps.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash tmpdir="$(mktemp -d)" @@ -7,21 +7,43 @@ cleanup() { } trap cleanup EXIT -targets="$(go tool dist list)" +declare -a targets=( + "darwin/amd64" + "darwin/arm64" + "freebsd/amd64" + "freebsd/arm/7" + "freebsd/386" + "linux/amd64" + "linux/arm64/7" + "linux/arm/5" + "linux/arm/6" + "linux/386" + "linux/mips" + "linux/mipsle" + "linux/ppc64le" + "linux/riscv64" + "linux/s390x" + "windows/amd64" + "windows/arm64" + "windows/386" +) -for target in ${targets}; do - # only check platforms we build for - case "${target}" in - linux/*) ;; - windows/*) ;; - freebsd/*) ;; - darwin/*) ;; - *) continue;; - esac +for target in "${targets[@]}"; do + os="${target%%/*}" + rest="${target#*/}" - echo "${target%%/*}/${target##*/}" - GOOS=${target%%/*} GOARCH=${target##*/} \ - go list -deps -f '{{with .Module}}{{.Path}}{{end}}' ./cmd/telegraf/ >> "${tmpdir}/golist" + if [[ "$rest" == */* ]]; then + arch="${rest%%/*}" + arm="${rest#*/}" + + echo "GOOS=${os} GOARCH=${arch} GOARM=${arm}" + CGO_ENABLED=0 GOOS=${os} GOARCH=${arch} GOARM=${arm} \ + go list -f '{{with .Module}}{{.Path}}{{end}}' -deps ./cmd/telegraf >> "${tmpdir}/golist" + else + echo "GOOS=${os} GOARCH=${rest}" + CGO_ENABLED=0 GOOS=${os} GOARCH=${rest} \ + go list -f '{{with .Module}}{{.Path}}{{end}}' -deps ./cmd/telegraf >> "${tmpdir}/golist" + fi done LC_ALL=C sort -u < "${tmpdir}/golist" | while IFS= read -r dep; do