Skip to content

Commit

Permalink
Merge pull request #1162 from chuckha/gomodule
Browse files Browse the repository at this point in the history
migrate away from vendor
  • Loading branch information
k8s-ci-robot authored Jul 25, 2019
2 parents 31c753f + 09e3543 commit 5a5ed91
Show file tree
Hide file tree
Showing 93 changed files with 41 additions and 55,808 deletions.
94 changes: 0 additions & 94 deletions Gopkg.lock

This file was deleted.

10 changes: 0 additions & 10 deletions Gopkg.toml

This file was deleted.

16 changes: 7 additions & 9 deletions hack/verify-kep-metadata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,15 @@ set -o errexit
set -o nounset
set -o pipefail

export KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
cd ${KUBE_ROOT}
TOOL_VERSION=v0.1.0

go install ./vendor/github.com/chuckha/kepview/cmd/kepval
if ! which kepval >/dev/null 2>&1; then
echo "Can't find kepval - is your GOPATH 'bin' in your PATH?" >&2
echo " GOPATH: ${GOPATH}" >&2
echo " PATH: ${PATH}" >&2
exit 1
fi
# cd to the root path
ROOT=$(dirname "${BASH_SOURCE}")/..
cd ${ROOT}

GO111MODULE=on go get "github.com/chuckha/kepview/cmd/kepval@${TOOL_VERSION}"

echo "Checking metadata validity..."
# * ignore "0023-documentation-for-images.md" because it is not a real KEP
# * ignore "YYYYMMDD-kep-template.md" because it is not a real KEP
grep --recursive --files-with-matches --regexp '---' --include='*.md' keps | grep --invert-match "YYYYMMDD-kep-template.md" | grep --invert-match "0023-documentation-for-images.md" | xargs kepval
44 changes: 28 additions & 16 deletions hack/verify-spelling.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,32 @@ set -o errexit
set -o nounset
set -o pipefail

export KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..

# Install tools we need, but only from vendor/...
cd ${KUBE_ROOT}
go install ./vendor/github.com/client9/misspell/cmd/misspell
if ! which misspell >/dev/null 2>&1; then
echo "Can't find misspell - is your GOPATH 'bin' in your PATH?" >&2
echo " GOPATH: ${GOPATH}" >&2
echo " PATH: ${PATH}" >&2
exit 1
fi
TOOL_VERSION="v0.3.4"

# cd to the root path
ROOT=$(dirname "${BASH_SOURCE}")/..
cd ${ROOT}

# create a temporary directory
TMP_DIR=$(mktemp -d)

# Spell checking
# All the skipping files are defined in hack/.spelling_failures
skipping_file="${KUBE_ROOT}/hack/.spelling_failures"
failing_packages=$(echo `cat ${skipping_file}` | sed "s| | -e |g")
git ls-files | grep -v -e ${failing_packages} | xargs misspell -i "" -error -o stderr
# cleanup
exitHandler() (
echo "Cleaning up..."
rm -rf "${TMP_DIR}"
)
trap exitHandler EXIT

GO111MODULE=on go get "github.com/client9/misspell/cmd/misspell@${TOOL_VERSION}"

# check spelling
RES=0
echo "Checking spelling..."
ERROR_LOG="${TMP_DIR}/errors.log"
git ls-files | grep -v vendor | xargs misspell > "${ERROR_LOG}"
if [[ -s "${ERROR_LOG}" ]]; then
sed 's/^/error: /' "${ERROR_LOG}" # add 'error' to each line to highlight in e2e status
echo "Found spelling errors!"
RES=1
fi
exit "${RES}"
16 changes: 6 additions & 10 deletions hack/verify-toc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,13 @@ set -o errexit
set -o nounset
set -o pipefail

export KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
TOOL_VERSION=4dc3d6f908138504b02a1766f1f8ea282d6bdd7c

# Install tools we need, but only from vendor/...
cd ${KUBE_ROOT}
go install ./vendor/github.com/tallclair/mdtoc
if ! which mdtoc >/dev/null 2>&1; then
echo "Can't find mdtoc - is your GOPATH 'bin' in your PATH?" >&2
echo " GOPATH: ${GOPATH}" >&2
echo " PATH: ${PATH}" >&2
exit 1
fi
# cd to the root path
ROOT=$(dirname "${BASH_SOURCE}")/..
cd ${ROOT}
GO111MODULE=on go get "github.com/tallclair/mdtoc@${TOOL_VERSION}"

echo "Checking table of contents are up to date..."
# Verify tables of contents are up-to-date
grep --include='*.md' -rl keps -e '<!-- toc -->' | xargs mdtoc --inplace --dryrun
21 changes: 0 additions & 21 deletions vendor/github.com/BurntSushi/toml/COPYING

This file was deleted.

This file was deleted.

This file was deleted.

21 changes: 0 additions & 21 deletions vendor/github.com/BurntSushi/toml/cmd/tomlv/COPYING

This file was deleted.

Loading

0 comments on commit 5a5ed91

Please sign in to comment.