2016-07-23 12:13:41 -04:00
|
|
|
#! /bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
IFS=$'\n\t'
|
|
|
|
|
|
|
|
# script to update the given dependency in the glide.lock file with the checked out branch on the local host
|
|
|
|
|
2016-08-10 01:45:55 -04:00
|
|
|
LIB=$1
|
|
|
|
|
|
|
|
GLIDE=$GOPATH/src/github.com/tendermint/tendermint/glide.lock
|
2016-07-23 12:13:41 -04:00
|
|
|
|
2016-09-10 20:11:45 -04:00
|
|
|
OLD_COMMIT=`bash scripts/glide/parse.sh $LIB`
|
2016-07-23 12:13:41 -04:00
|
|
|
|
|
|
|
PWD=`pwd`
|
|
|
|
cd $GOPATH/src/github.com/tendermint/$LIB
|
|
|
|
|
|
|
|
NEW_COMMIT=$(git rev-parse HEAD)
|
|
|
|
|
|
|
|
cd $PWD
|
2016-10-10 14:55:54 -04:00
|
|
|
sed -i "" "s/$OLD_COMMIT/$NEW_COMMIT/g" $GLIDE
|