2018-02-27 05:20:56 -08:00
|
|
|
#! /bin/bash
|
|
|
|
|
2018-02-27 23:15:40 -08:00
|
|
|
set +u
|
|
|
|
if [[ "$DEP" == "" ]]; then
|
2018-02-28 00:24:26 -08:00
|
|
|
DEP=$GOPATH/src/github.com/tendermint/tendermint/Gopkg.lock
|
2018-02-27 23:15:40 -08:00
|
|
|
fi
|
|
|
|
set -u
|
|
|
|
|
2018-02-28 00:24:26 -08:00
|
|
|
|
2018-02-27 23:15:40 -08:00
|
|
|
set -euo pipefail
|
2018-02-27 06:47:53 -08:00
|
|
|
|
2018-02-27 05:20:56 -08:00
|
|
|
LIB=$1
|
|
|
|
|
2018-02-27 23:15:40 -08:00
|
|
|
grep -A100 "$LIB" "$DEP" | grep revision | head -n1 | grep -o '"[^"]\+"' | cut -d '"' -f 2
|