forked from hashicorp/vault
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate_deps.sh
More file actions
executable file
·39 lines (28 loc) · 770 Bytes
/
update_deps.sh
File metadata and controls
executable file
·39 lines (28 loc) · 770 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
set -e
TOOL=vault
## Make a temp dir
tempdir=$(mktemp -d update-${TOOL}-deps.XXXXXX)
## Set paths
export GOPATH="$(pwd)/${tempdir}"
export PATH="${GOPATH}/bin:${PATH}"
cd $tempdir
## Get Vault
mkdir -p src/github.com/hashicorp
cd src/github.com/hashicorp
echo "Fetching ${TOOL}..."
git clone https://github.com/hashicorp/${TOOL}
cd ${TOOL}
## Clean out earlier vendoring
rm -rf Godeps vendor
## Get govendor
go get github.com/kardianos/govendor
## Init
govendor init
## Fetch deps
echo "Fetching deps, will take some time..."
govendor fetch +missing
govendor remove github.com/Sirupsen/logrus
cd vendor
find -type f | grep '.go' | xargs sed -i -e 's/Sirupsen/sirupsen/'
echo "Done; to commit run \n\ncd ${GOPATH}/src/github.com/hashicorp/${TOOL}\n"