Blame SOURCES/list_go_buildrequires.sh

6b5415
#!/bin/bash -eu
6b5415
6b5415
[ $# -ne 1 ] && echo "Usage: $0 grafana-X.Y.Z/" && exit 1
6b5415
GRAFANA_SOURCES="$(readlink -f "$1")"
6b5415
6b5415
cd "$(mktemp -d)"
6b5415
mkdir -p src/github.com/grafana
6b5415
ln -s "${GRAFANA_SOURCES}" src/github.com/grafana/grafana
6b5415
ln -s "${GRAFANA_SOURCES}/vendor/github.com/grafana/grafana-plugin-model" src/github.com/grafana/grafana-plugin-model
6b5415
ln -s "${GRAFANA_SOURCES}/vendor/github.com/grafana/grafana-plugin-sdk-go" src/github.com/grafana/grafana-plugin-sdk-go
6b5415
6b5415
for pkg in grafana grafana-plugin-model grafana-plugin-sdk-go
6b5415
do
6b5415
    GOPATH=$(pwd) golist --imported --package-path "github.com/grafana/$pkg" --skip-self --template 'BuildRequires: golang({{.}})\n'
6b5415
done | sed \
6b5415
    -e "s,github.com/linkedin/goavro/v2,github.com/linkedin/goavro,g" \
6b5415
    -e "s,github.com/go-xorm/xorm,xorm.io/xorm,g" \
6b5415
    -e "s,github.com/robfig/cron/v3,gopkg.in/robfig/cron.v3,g" \
6b5415
    -e "s,github.com/unknwon/com,github.com/Unknwon/com,g" \
6b5415
    | sort | uniq