mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 18:00:08 +00:00
workspace mirror: add trailing newline to urls list
This commit is contained in:
parent
8bf47d7237
commit
b9efd1f467
@ -39,7 +39,11 @@ def export_urls_impl(repo_ctx):
|
|||||||
repo_ctx.file(repo_ctx.path("BUILD.bazel"), """
|
repo_ctx.file(repo_ctx.path("BUILD.bazel"), """
|
||||||
exports_files(glob(["**"]), visibility=["//visibility:public"])
|
exports_files(glob(["**"]), visibility=["//visibility:public"])
|
||||||
""")
|
""")
|
||||||
repo_ctx.file(repo_ctx.path("urls.txt"), content = "\n".join(repo_ctx.attr.urls))
|
repo_ctx.file(
|
||||||
|
repo_ctx.path("urls.txt"),
|
||||||
|
# Add a trailing newline, since the "while read" loop needs it
|
||||||
|
content = ("\n".join(repo_ctx.attr.urls) + "\n"),
|
||||||
|
)
|
||||||
|
|
||||||
_export_urls = repository_rule(
|
_export_urls = repository_rule(
|
||||||
attrs = {
|
attrs = {
|
||||||
|
@ -19,7 +19,7 @@ set -o nounset
|
|||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
if [[ $# -ne 1 ]]; then
|
if [[ $# -ne 1 ]]; then
|
||||||
echo 'use "bazel run //build:update-mirror"'
|
echo 'use "bazel run //hack:update-mirror"'
|
||||||
echo "(usage: $0 <file with list of URLs to mirror>)"
|
echo "(usage: $0 <file with list of URLs to mirror>)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user