Merge pull request #538 from Random-Liu/improve-update-vendor

Change hack/update-vendor.sh to sync again with new vendor
This commit is contained in:
Lantao Liu 2018-01-11 16:32:26 -08:00 committed by GitHub
commit 859fb747d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,7 +21,7 @@ set -o pipefail
source $(dirname "${BASH_SOURCE[0]}")/utils.sh
cd ${ROOT}
echo "Compare vendor with hack/versions..."
update_hack_versions() {
need_update=false
declare -A map=()
map["RUNC_VERSION"]="github.com/opencontainers/runc"
@ -47,6 +47,10 @@ if [ ${need_update} = true ]; then
echo "Please update \"hack/versions\" by executing \"hack/update-vendor.sh\"!"
exit 1
fi
}
echo "Compare vendor with hack/versions..."
update_hack_versions
# hack/versions should be correct now.
echo "Compare vendor with containerd vendors..."
@ -91,6 +95,9 @@ if ! diff vendor.conf ${tmp_vendor} > /dev/null; then
fi
rm ${containerd_vendor}
echo "Compare new vendor with hack/versions..."
update_hack_versions
echo "Sort vendor.conf..."
sort vendor.conf -o vendor.conf