storj.io/uplink@v1.13.0/scripts/check-dependencies.sh (about) 1 #!/usr/bin/env bash 2 set -ueo pipefail 3 set +x 4 5 # This script verifies that we don't accidentally import specific packages. 6 7 if go list -deps -test . | grep -q "google.golang.org/grpc"; then 8 echo "uplink must not have a dependency to grpc"; 9 exit -1; 10 fi 11 12 if go list -deps -test . | grep -q "storj.io/storj"; then 13 echo "uplink must not have a dependency to storj.io/storj"; 14 exit -1; 15 fi 16 17 if go list -deps -test . | grep -Eq "github.com/(lib/pq|jackc/pg)"; then 18 echo "uplink must not have a dependency to postgres"; 19 exit -1; 20 fi 21 22 if go list -deps -test . | grep -q "redis"; then 23 echo "uplink must not have a dependency to redis"; 24 exit -1; 25 fi 26 27 if go list -deps -test ./... | grep -q "bolt"; then 28 echo "common must not have a dependency to bolt"; 29 exit -1; 30 fi 31 32 if go list -deps . | grep -q "testing"; then 33 echo "uplink must not have a dependency to testing"; 34 exit -1; 35 fi 36 37 if go list -deps . | grep -q "zap"; then 38 echo "uplink must not have a dependency to zap"; 39 exit -1; 40 fi