Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
35cdbdf1
Unverified
Commit
35cdbdf1
authored
Nov 07, 2018
by
Christoph Blecker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use ensured godep instead of relying on PATH
parent
c0c62821
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
11 deletions
+5
-11
godep-restore.sh
hack/godep-restore.sh
+1
-1
godep-save.sh
hack/godep-save.sh
+1
-1
util.sh
hack/lib/util.sh
+2
-7
update-staging-godeps-dockerized.sh
hack/update-staging-godeps-dockerized.sh
+1
-1
verify-godeps.sh
hack/verify-godeps.sh
+0
-1
No files found.
hack/godep-restore.sh
View file @
35cdbdf1
...
@@ -31,5 +31,5 @@ fi
...
@@ -31,5 +31,5 @@ fi
kube::util::ensure_godep_version
kube::util::ensure_godep_version
kube::log::status
"Downloading dependencies - this might take a while"
kube::log::status
"Downloading dependencies - this might take a while"
GOPATH
=
"
${
GOPATH
}
:
${
KUBE_ROOT
}
/staging"
godep
restore
"
$@
"
GOPATH
=
"
${
GOPATH
}
:
${
KUBE_ROOT
}
/staging"
${
KUBE_GODEP
:?
}
restore
"
$@
"
kube::log::status
"Done"
kube::log::status
"Done"
hack/godep-save.sh
View file @
35cdbdf1
...
@@ -71,7 +71,7 @@ kube::log::status "Running godep save - this might take a while"
...
@@ -71,7 +71,7 @@ kube::log::status "Running godep save - this might take a while"
# This uses $(pwd) rather than ${KUBE_ROOT} because KUBE_ROOT will be
# This uses $(pwd) rather than ${KUBE_ROOT} because KUBE_ROOT will be
# realpath'ed, and godep barfs ("... is not using a known version control
# realpath'ed, and godep barfs ("... is not using a known version control
# system") on our staging dirs.
# system") on our staging dirs.
GOPATH
=
"
${
GOPATH
}
:
$(
pwd
)
/staging"
godep
save
"
${
REQUIRED_BINS
[@]
}
"
GOPATH
=
"
${
GOPATH
}
:
$(
pwd
)
/staging"
${
KUBE_GODEP
:?
}
save
"
${
REQUIRED_BINS
[@]
}
"
# create a symlink in vendor directory pointing to the staging client. This
# create a symlink in vendor directory pointing to the staging client. This
# let other packages use the staging client as if it were vendored.
# let other packages use the staging client as if it were vendored.
...
...
hack/lib/util.sh
View file @
35cdbdf1
...
@@ -454,13 +454,7 @@ kube::util::ensure_godep_version() {
...
@@ -454,13 +454,7 @@ kube::util::ensure_godep_version() {
return
return
fi
fi
# If GODEP is in the path, then use it.
# Otherwise, install forked godep
if
[[
"
$(
godep version 2>/dev/null
)
"
==
*
"godep
${
godep_target_version
}
"
*
]]
;
then
export
KUBE_GODEP
=
"
$(
which godep
)
"
kube::log::status
"Using
${
KUBE_GODEP
}
"
return
fi
kube::log::status
"Installing godep version
${
godep_target_version
}
"
kube::log::status
"Installing godep version
${
godep_target_version
}
"
# Run in hermetic GOPATH
# Run in hermetic GOPATH
kube::golang::setup_env
kube::golang::setup_env
...
@@ -468,6 +462,7 @@ kube::util::ensure_godep_version() {
...
@@ -468,6 +462,7 @@ kube::util::ensure_godep_version() {
export
KUBE_GODEP
=
"
${
KUBE_GOPATH
}
/bin/godep"
export
KUBE_GODEP
=
"
${
KUBE_GOPATH
}
/bin/godep"
kube::log::status
"Installed
${
KUBE_GODEP
}
"
kube::log::status
"Installed
${
KUBE_GODEP
}
"
# Verify that the installed godep from fork is what we expect
if
[[
"
$(${
KUBE_GODEP
:?
}
version 2>/dev/null
)
"
!=
*
"godep
${
godep_target_version
}
"
*
]]
;
then
if
[[
"
$(${
KUBE_GODEP
:?
}
version 2>/dev/null
)
"
!=
*
"godep
${
godep_target_version
}
"
*
]]
;
then
kube::log::error
"Expected godep
${
godep_target_version
}
from
${
KUBE_GODEP
}
, got
$(${
KUBE_GODEP
:?
}
version
)
"
kube::log::error
"Expected godep
${
godep_target_version
}
from
${
KUBE_GODEP
}
, got
$(${
KUBE_GODEP
:?
}
version
)
"
return
1
return
1
...
...
hack/update-staging-godeps-dockerized.sh
View file @
35cdbdf1
...
@@ -70,7 +70,7 @@ function updateGodepManifest() {
...
@@ -70,7 +70,7 @@ function updateGodepManifest() {
pushd
"
${
TMP_GOPATH
}
/src/k8s.io/
${
repo
}
"
>
/dev/null
pushd
"
${
TMP_GOPATH
}
/src/k8s.io/
${
repo
}
"
>
/dev/null
kube::log::status
"Updating godeps for k8s.io/
${
repo
}
"
kube::log::status
"Updating godeps for k8s.io/
${
repo
}
"
rm
-rf
Godeps
# remove the current Godeps.json so we always rebuild it
rm
-rf
Godeps
# remove the current Godeps.json so we always rebuild it
GOPATH
=
"
${
TMP_GOPATH
}
:
${
GOPATH
}
:
${
GOPATH
}
/src/k8s.io/kubernetes/staging"
godep
save
${
GODEP_OPTS
}
./... 2>&1 |
sed
's/^/ /'
GOPATH
=
"
${
TMP_GOPATH
}
:
${
GOPATH
}
:
${
GOPATH
}
/src/k8s.io/kubernetes/staging"
${
KUBE_GODEP
:?
}
save
${
GODEP_OPTS
}
./... 2>&1 |
sed
's/^/ /'
# Rewriting Godeps.json to cross-out commits that don't really exist because we haven't pushed the prereqs yet
# Rewriting Godeps.json to cross-out commits that don't really exist because we haven't pushed the prereqs yet
local
repo
local
repo
...
...
hack/verify-godeps.sh
View file @
35cdbdf1
...
@@ -51,7 +51,6 @@ function cleanup {
...
@@ -51,7 +51,6 @@ function cleanup {
echo
"Removing
${
_tmpdir
}
"
echo
"Removing
${
_tmpdir
}
"
rm
-rf
"
${
_tmpdir
}
"
rm
-rf
"
${
_tmpdir
}
"
fi
fi
export
GODEP
=
""
}
}
trap
cleanup EXIT
trap
cleanup EXIT
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment