Codebase list golang-github-go-kit-kit / 2159fb24-df80-4a66-a950-52f06cc10bdb/main update_deps.bash
2159fb24-df80-4a66-a950-52f06cc10bdb/main

Tree @2159fb24-df80-4a66-a950-52f06cc10bdb/main (Download .tar.gz)

update_deps.bash @2159fb24-df80-4a66-a950-52f06cc10bdb/main

772919e
 
0c9f6e7
772919e
 
 
 
 
 
 
 
 
 
 
 
75666f7
772919e
 
 
31d842c
 
772919e
b1eb1a0
772919e
 
 
 
 
#!/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 -f '{{join .Deps "\n"}}' ./...
}

function not_stdlib {
	xargs go list -f '{{if not .Standard}}{{.ImportPath}}{{end}}'
}

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 | not_stdlib | not_gokit | go_get_update