Skip to content

Commit 263bd69

Browse files
committed
Swift: fix artifact update infrastructure
1 parent a82d37e commit 263bd69

File tree

4 files changed

+19
-3
lines changed

4 files changed

+19
-3
lines changed

MODULE.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@ use_repo(
9696
"binlog",
9797
"picosha2",
9898
"swift-prebuilt-linux",
99+
"swift-prebuilt-linux-download-only",
99100
"swift-prebuilt-macos",
101+
"swift-prebuilt-macos-download-only",
100102
"swift-resource-dir-linux",
101103
"swift-resource-dir-macos",
102104
)

swift/third_party/load.bzl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,25 @@ def _load_prebuilt(plat):
4747
build_file = build,
4848
**override
4949
)
50+
51+
# this is for `//swift/third_party/resources:update-prebuilt-*` support
52+
http_file(
53+
name = name + "-download-only",
54+
**override
55+
)
5056
else:
5157
lfs_archive(
5258
name = name,
5359
src = "//swift/third_party/resources:%s" % file,
5460
build_file = build,
5561
)
5662

63+
# unused, but saves us some bazel mod tidy dance when in override mode
64+
lfs_files(
65+
name = name + "-download-only",
66+
srcs = ["//swift/third_party/resources:%s" % file],
67+
)
68+
5769
def _github_archive(*, name, repository, commit, build_file = None, sha256 = None):
5870
github_name = repository[repository.index("/") + 1:]
5971
maybe(

swift/third_party/resources/BUILD.bazel

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,25 @@ alias(
2525
name = "update-%s-%s" % (what, os),
2626
srcs = ["update.sh"],
2727
args = [
28-
"$(rlocationpath %s)" % what,
28+
"$(rlocationpath %s)" % source,
2929
"$(rlocationpath %s)" % target,
3030
],
3131
data = [
32-
what,
32+
source,
3333
target,
3434
],
3535
deps = ["//misc/bazel:sh_runfiles"],
3636
)
3737
for os in _oses
38-
for what, target in (
38+
for what, source, target in (
3939
(
4040
"prebuilt",
41+
"@swift-prebuilt-%s-download-only//file" % os,
4142
"swift-prebuilt-%s.tar.zst" % os,
4243
),
4344
(
4445
"dir",
46+
"@swift-resource-dir-%s//file" % os,
4547
"resource-dir-%s.zip" % os,
4648
),
4749
)

swift/third_party/resources/update.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)