mirror of
https://github.com/containers/skopeo.git
synced 2025-09-13 05:23:05 +00:00
Allow keeping vendor subdirectories in vendored packages
github.com/coreos/etcd as of v2.2.5 uses a Godeps subdirectory, and imports packages by including the Godeps path fragments directly in the package name; so we can't just remove the subdirectory and vendor the included package directly. So, add a flag to clone() to surpress removing the vendor subdirectories.
This commit is contained in:
@@ -10,6 +10,12 @@ export GOPATH="$GOPATH:${PWD}/vendor"
|
|||||||
find="/usr/bin/find"
|
find="/usr/bin/find"
|
||||||
|
|
||||||
clone() {
|
clone() {
|
||||||
|
local delete_vendor=true
|
||||||
|
if [ "x$1" = x--keep-vendor ]; then
|
||||||
|
delete_vendor=false
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
local vcs="$1"
|
local vcs="$1"
|
||||||
local pkg="$2"
|
local pkg="$2"
|
||||||
local rev="$3"
|
local rev="$3"
|
||||||
@@ -39,8 +45,10 @@ clone() {
|
|||||||
echo -n 'rm VCS, '
|
echo -n 'rm VCS, '
|
||||||
( cd "$target" && rm -rf .{git,hg} )
|
( cd "$target" && rm -rf .{git,hg} )
|
||||||
|
|
||||||
|
if $delete_vendor; then
|
||||||
echo -n 'rm vendor, '
|
echo -n 'rm vendor, '
|
||||||
( cd "$target" && rm -rf vendor Godeps/_workspace )
|
( cd "$target" && rm -rf vendor Godeps/_workspace )
|
||||||
|
fi
|
||||||
|
|
||||||
echo done
|
echo done
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user