workspace mirror: add trailing newline to urls list

pull/8/head
Jeff Grafton 2018-05-07 16:47:52 -07:00
parent 8bf47d7237
commit b9efd1f467
2 changed files with 6 additions and 2 deletions

View File

@ -39,7 +39,11 @@ def export_urls_impl(repo_ctx):
repo_ctx.file(repo_ctx.path("BUILD.bazel"), """
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(
attrs = {

View File

@ -19,7 +19,7 @@ set -o nounset
set -o pipefail
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>)"
exit 1
fi