Codebase list golang-github-go-kit-kit / 7dc1564a-2138-45e4-af73-604b41ff1c0e/main update_deps.bash

Tree @7dc1564a-2138-45e4-af73-604b41ff1c0e/main (Download .tar.gz)

update_deps.bash @7dc1564a-2138-45e4-af73-604b41ff1c0e/mainraw · history · blame

#!/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
		echo $d
		go get -u $d || echo "failed, trying again with master" && cd $GOPATH/src/$d && git checkout master && go get -u $d

deps | not_stdlib | not_gokit | go_get_update