Codebase list golang-github-go-kit-kit / d2f2902b-79c4-43cd-8c09-341e33fc6017/v0.10.0 update_deps.bash
d2f2902b-79c4-43cd-8c09-341e33fc6017/v0.10.0

Tree @d2f2902b-79c4-43cd-8c09-341e33fc6017/v0.10.0 (Download .tar.gz)

update_deps.bash @d2f2902b-79c4-43cd-8c09-341e33fc6017/v0.10.0

772919e
 
0c9f6e7
772919e
 
 
 
76396d1
772919e
 
76396d1
 
772919e
 
 
75666f7
772919e
 
 
31d842c
 
772919e
76396d1
772919e
 
 
76396d1
#!/usr/bin/env bash

# This script updates each non-stdlib, non-Go-kit dependency to its most recent
# commit. It can be invoked to aid in debugging after a dependency-related
# failure on continuous integration.

function deps {
	go list -deps -f '{{if and .DepOnly (not .Standard)}}{{.ImportPath}}{{end}}' ./...
}

function unique_repos {
	cut -d '/' -f-3 | sort | uniq
}

function not_gokit {
	grep -v 'go-kit/kit'
}

function go_get_update {
	while read d
	do
		echo $d
		go get -u $d/... || echo "failed, trying again with master" && cd $GOPATH/src/$d && git checkout master && go get -u $d
	done
}

deps | unique_repos | not_gokit | go_get_update