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
263b9185
Commit
263b9185
authored
Jul 24, 2017
by
Dr. Stefan Schimanski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hack/update-staging-godep.sh: check for staging repos in GOPATH
parent
a6bfeef4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
12 deletions
+19
-12
godep-save.sh
hack/godep-save.sh
+1
-12
util.sh
hack/lib/util.sh
+16
-0
update-staging-godeps.sh
hack/update-staging-godeps.sh
+2
-0
No files found.
hack/godep-save.sh
View file @
263b9185
...
...
@@ -24,6 +24,7 @@ source "${KUBE_ROOT}/hack/lib/util.sh"
kube::util::ensure_single_dir_gopath
kube::util::ensure_godep_version v79
kube::util::ensure_no_staging_repos_in_gopath
if
[
-e
"
${
KUBE_ROOT
}
/vendor"
-o
-e
"
${
KUBE_ROOT
}
/Godeps"
]
;
then
echo
"The directory vendor/ or Godeps/ exists. Remove them before running godep-save.sh"
1>&2
...
...
@@ -40,18 +41,6 @@ REQUIRED_BINS=(
)
pushd
"
${
KUBE_ROOT
}
"
>
/dev/null
# sanity check that staging directories do not exist in GOPATH
error
=
0
for
repo
in
$(
ls
${
KUBE_ROOT
}
/staging/src/k8s.io
)
;
do
if
[
-e
"
${
GOPATH
}
/src/k8s.io/
${
repo
}
"
]
;
then
echo
"k8s.io/
${
repo
}
exists in GOPATH. Remove before running godep-save.sh."
1>&2
error
=
1
fi
done
if
[
"
${
error
}
"
=
"1"
]
;
then
exit
1
fi
echo
"Running godep save. This will take around 15 minutes."
GOPATH
=
${
GOPATH
}
:
${
KUBE_ROOT
}
/staging godep save
"
${
REQUIRED_BINS
[@]
}
"
...
...
hack/lib/util.sh
View file @
263b9185
...
...
@@ -513,6 +513,22 @@ kube::util::ensure_godep_version() {
godep version
}
# Ensure that none of the staging repos is checked out in the GOPATH because this
# easily confused godep.
kube::util::ensure_no_staging_repos_in_gopath
()
{
kube::util::ensure_single_dir_gopath
local
error
=
0
for
repo
in
$(
ls
${
KUBE_ROOT
}
/staging/src/k8s.io
)
;
do
if
[
-e
"
${
GOPATH
}
/src/k8s.io/
${
repo
}
"
]
;
then
echo
"k8s.io/
${
repo
}
exists in GOPATH. Remove before running godep-save.sh."
1>&2
error
=
1
fi
done
if
[
"
${
error
}
"
=
"1"
]
;
then
exit
1
fi
}
# Installs the specified go package at a particular commit.
kube::util::go_install_from_commit
()
{
local
-r
pkg
=
$1
...
...
hack/update-staging-godeps.sh
View file @
263b9185
...
...
@@ -56,7 +56,9 @@ if ! kube::util::godep_restored 2>&1 | sed 's/^/ /'; then
fi
kube::util::ensure-temp-dir
kube::util::ensure_single_dir_gopath
kube::util::ensure_godep_version v79
kube::util::ensure_no_staging_repos_in_gopath
TMP_GOPATH
=
"
${
KUBE_TEMP
}
/go"
...
...
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