OSDN Git Service

new repo
[bytom/vapor.git] / vendor / github.com / go-kit / kit / update_deps.bash
1 #!/usr/bin/env bash
2
3 # This script updates each non-stdlib, non-Go-kit dependency to its most recent
4 # commit. It can be invoked to aid in debugging after a dependency-related
5 # failure on continuous integration.
6
7 function deps {
8         go list -f '{{join .Deps "\n"}}' ./...
9 }
10
11 function not_stdlib {
12         xargs go list -f '{{if not .Standard}}{{.ImportPath}}{{end}}'
13 }
14
15 function not_gokit {
16         grep -v 'go-kit/kit'
17 }
18
19 function go_get_update {
20         while read d
21         do
22                 echo $d
23                 go get -u $d || echo "failed, trying again with master" && cd $GOPATH/src/$d && git checkout master && go get -u $d
24         done
25 }
26
27 deps | not_stdlib | not_gokit | go_get_update
28