Merge pull request #62210 from ixdy/verify-bazel-macos-tmpdir

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fully resolve tmpdir in verify-bazel.sh, since it might be a symlink on macOS

**What this PR does / why we need it**: Apparently the system tmpdir is inside a symlink on macOS, which confuses gazelle's symlink logic. By resolving this symlink to the absolute path, we can avoid the issue. 

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #61986

**Release note**:

```release-note
NONE
```

/assign @cblecker 
cc @patrikerdes
pull/8/head
Kubernetes Submit Queue 2018-04-07 22:27:10 -07:00 committed by GitHub
commit bb3887d7dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ fi
# TODO(spxtr): Remove this line once Bazel is the only way to build.
rm -f "${KUBE_ROOT}/pkg/generated/openapi/zz_generated.openapi.go"
_tmpdir="$(mktemp -d -t verify-bazel.XXXXXX)"
_tmpdir="$(kube::realpath $(mktemp -d -t verify-bazel.XXXXXX))"
kube::util::trap_add "rm -rf ${_tmpdir}" EXIT
_tmp_gopath="${_tmpdir}/go"

View File

@ -35,7 +35,7 @@ kube::util::ensure_godep_version
if [[ -z ${TMP_GOPATH:-} ]]; then
# Create a nice clean place to put our new godeps
_tmpdir="$(mktemp -d -t gopath.XXXXXX)"
_tmpdir="$(kube::realpath $(mktemp -d -t gopath.XXXXXX))"
else
# reuse what we might have saved previously
_tmpdir="${TMP_GOPATH}"