diff options
| author | zhangjie <iamkadisi@163.com> | 2019-09-30 20:48:31 +0800 |
|---|---|---|
| committer | zhangjie <iamkadisi@163.com> | 2019-10-01 17:59:39 +0800 |
| commit | 7f60045bac1853839f709752b934d43a7973c3d4 (patch) | |
| tree | 2da01a25afb5706a5f1efe9071122b7146f267e6 /hack/verify-vendor.sh | |
| parent | create a symlink in vendor directory pointing to the staging components (diff) | |
| download | kubeedge-7f60045bac1853839f709752b934d43a7973c3d4.tar.gz | |
add verify-vendor.sh
Signed-off-by: zhangjie <iamkadisi@163.com>
Diffstat (limited to 'hack/verify-vendor.sh')
| -rwxr-xr-x | hack/verify-vendor.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/hack/verify-vendor.sh b/hack/verify-vendor.sh new file mode 100755 index 000000000..1f44855a0 --- /dev/null +++ b/hack/verify-vendor.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +### +#Copyright 2019 The KubeEdge Authors. +# +#Licensed under the Apache License, Version 2.0 (the "License"); +#you may not use this file except in compliance with the License. +#You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +#Unless required by applicable law or agreed to in writing, software +#distributed under the License is distributed on an "AS IS" BASIS, +#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +#See the License for the specific language governing permissions and +#limitations under the License. +### + +set -o errexit +set -o nounset +set -o pipefail + +# The root of the build/dist directory +KUBEEDGE_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)" + +function kubeedge::git::check_status() { + echo $( git status --short 2>/dev/null | wc -l) +} + +${KUBEEDGE_ROOT}/hack/update-vendor.sh + +ret=$(kubeedge::git::check_status) +if [ ${ret} -eq 0 ]; then + echo "SUCCESS: Vendor Verified." +else + echo "FAILED: Vendor Verify failed. Please run the command to check your directories: git status" + exit 1 +fi |
