mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #25668 from LK4D4/remove_rewrite
hack/vendor.sh: remove old hacks for etcd
This commit is contained in:
commit
f4646196b6
1 changed files with 0 additions and 17 deletions
|
@ -119,13 +119,6 @@ clean() {
|
||||||
-path vendor/src/github.com/mattn/go-sqlite3/code
|
-path vendor/src/github.com/mattn/go-sqlite3/code
|
||||||
)
|
)
|
||||||
|
|
||||||
# This package is required to build the Etcd client,
|
|
||||||
# but Etcd hard codes a local Godep full path.
|
|
||||||
# FIXME: fix_rewritten_imports fixes this problem in most platforms
|
|
||||||
# but it fails in very small corner cases where it makes the vendor
|
|
||||||
# script to remove this package.
|
|
||||||
# See: https://github.com/docker/docker/issues/19231
|
|
||||||
findArgs+=( -or -path vendor/src/github.com/ugorji/go/codec )
|
|
||||||
for import in "${imports[@]}"; do
|
for import in "${imports[@]}"; do
|
||||||
[ "${#findArgs[@]}" -eq 0 ] || findArgs+=( -or )
|
[ "${#findArgs[@]}" -eq 0 ] || findArgs+=( -or )
|
||||||
findArgs+=( -path "vendor/src/$import" )
|
findArgs+=( -path "vendor/src/$import" )
|
||||||
|
@ -152,13 +145,3 @@ clean() {
|
||||||
|
|
||||||
echo done
|
echo done
|
||||||
}
|
}
|
||||||
|
|
||||||
# Fix up hard-coded imports that refer to Godeps paths so they'll work with our vendoring
|
|
||||||
fix_rewritten_imports () {
|
|
||||||
local pkg="$1"
|
|
||||||
local remove="${pkg}/Godeps/_workspace/src/"
|
|
||||||
local target="vendor/src/$pkg"
|
|
||||||
|
|
||||||
echo "$pkg: fixing rewritten imports"
|
|
||||||
$find "$target" -name \*.go -exec sed -i'.orig' -e "s|\"${remove}|\"|g" {} \;
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue