mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Use git archive to produce kubernetes-src.tar.gz when possible
This commit is contained in:
parent
2b04a66df7
commit
96e2da2992
@ -98,18 +98,23 @@ function kube::release::package_tarballs() {
|
|||||||
|
|
||||||
# Package the source code we built, for compliance/licensing/audit/yadda.
|
# Package the source code we built, for compliance/licensing/audit/yadda.
|
||||||
function kube::release::package_src_tarball() {
|
function kube::release::package_src_tarball() {
|
||||||
|
local -r src_tarball="${RELEASE_TARS}/kubernetes-src.tar.gz"
|
||||||
kube::log::status "Building tarball: src"
|
kube::log::status "Building tarball: src"
|
||||||
local source_files=(
|
if [[ "${KUBE_GIT_TREE_STATE-}" == "clean" ]]; then
|
||||||
$(cd "${KUBE_ROOT}" && find . -mindepth 1 -maxdepth 1 \
|
git archive -o "${src_tarball}" HEAD
|
||||||
-not \( \
|
else
|
||||||
\( -path ./_\* -o \
|
local source_files=(
|
||||||
-path ./.git\* -o \
|
$(cd "${KUBE_ROOT}" && find . -mindepth 1 -maxdepth 1 \
|
||||||
-path ./.config\* -o \
|
-not \( \
|
||||||
-path ./.gsutil\* \
|
\( -path ./_\* -o \
|
||||||
\) -prune \
|
-path ./.git\* -o \
|
||||||
\))
|
-path ./.config\* -o \
|
||||||
)
|
-path ./.gsutil\* \
|
||||||
"${TAR}" czf "${RELEASE_TARS}/kubernetes-src.tar.gz" -C "${KUBE_ROOT}" "${source_files[@]}"
|
\) -prune \
|
||||||
|
\))
|
||||||
|
)
|
||||||
|
"${TAR}" czf "${src_tarball}" -C "${KUBE_ROOT}" "${source_files[@]}"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Package up all of the cross compiled clients. Over time this should grow into
|
# Package up all of the cross compiled clients. Over time this should grow into
|
||||||
|
Loading…
Reference in New Issue
Block a user