Skip to content

Commit c875667

Browse files
author
Paolo Tranquilli
committed
Swift: update to 6.0.2
1 parent 87a08fe commit c875667

File tree

2 files changed

+21
-14
lines changed

2 files changed

+21
-14
lines changed

swift/third_party/load.bzl

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,30 @@ load("//misc/bazel:lfs.bzl", "lfs_archive", "lfs_files")
55

66
_override = {
77
# these are used to test new artifacts. Must be empty before merging to main
8-
"swift-prebuilt-macOS.tar.zst": "4679ad4086ac6894e2f8a6bd71c5033941c894844809bf988dacb8af0c384416",
9-
"swift-prebuilt-Linux.tar.zst": "c45976d50670964132cef1dcf98bccd3fff809d33b2207a85cf3cfd07ec84528",
10-
"resource-dir-macOS.zip": "286e4403aa0a56641c2789e82036481535e336484f2c760bec0f42e3afe5dd87",
11-
"resource-dir-Linux.zip": "16a1760f152395377a580a994885e0877338279125834463a6a38f4006ad61ca",
8+
"swift-prebuilt-macOS-swift-6.0.2-RELEASE-25.tar.zst": "4c81917da67ff2bb642ef2e34e005466b06f756c958702ec070bcacdb83c2f76",
9+
"swift-prebuilt-Linux-swift-6.0.2-RELEASE-25.tar.zst": "af1e3355fb476538449424a74f15ce21a0f877c7f85a568e736f0bd6c0239a8f",
10+
"resource-dir-macOS-swift-6.0.2-RELEASE-33.zip": "38f48790fea144b7cf5918b885f32a0f68e21aa5f3c2f0a5722573cc9e950639",
11+
"resource-dir-Linux-swift-6.0.2-RELEASE-33.zip": "403374c72e20299951c2c37185404500d15340baaa52bb2d06f8815b03f8071e",
1212
}
1313

14-
_staging_url = "https://github.com/dsp-testing/codeql-swift-artifacts/releases/download/staging-{file}/{file}"
14+
_staging_url = "https://github.com/dsp-testing/codeql-swift-artifacts/releases/download/staging-{}/{}"
15+
16+
def _get_override(file):
17+
prefix, _, _ = file.partition(".")
18+
for key, value in _override.items():
19+
if key.startswith(prefix):
20+
return {"url": _staging_url.format(prefix, key), "sha256": value}
21+
return None
1522

1623
def _load_resource_dir(plat):
1724
name = "swift-resource-dir-%s" % plat.lower()
1825
file = "resource-dir-%s.zip" % plat
19-
if file in _override:
26+
override = _get_override(file)
27+
if override:
2028
http_file(
2129
name = name,
22-
url = _staging_url.format(file = file),
23-
sha256 = _override[file],
2430
downloaded_file_path = file,
31+
**override
2532
)
2633
else:
2734
lfs_files(
@@ -32,13 +39,13 @@ def _load_resource_dir(plat):
3239
def _load_prebuilt(plat):
3340
name = "swift-prebuilt-%s" % plat.lower()
3441
file = "swift-prebuilt-%s.tar.zst" % plat
42+
override = _get_override(file)
3543
build = _build % "swift-llvm-support"
36-
if file in _override:
44+
if override:
3745
http_archive(
3846
name = name,
39-
url = _staging_url.format(file = file),
40-
sha256 = _override[file],
4147
build_file = build,
48+
**override
4249
)
4350
else:
4451
lfs_archive(
@@ -91,7 +98,7 @@ swift_deps = module_extension(load_dependencies)
9198
def test_no_override():
9299
test_body = ["#!/bin/bash", ""]
93100
test_body += [
94-
'echo \\"%s\\" overridden in swift/third/party/load.bzl' % key
101+
'echo \\"%s\\" override in swift/third/party/load.bzl' % key
95102
for key in _override
96103
]
97104
if _override:

swift/third_party/resources/updating.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ These files can only be updated having access for the internal repository at the
22

33
In order to perform a Swift update:
44

5-
1. Dispatch the https://github.com/github/semmle-code/actions/workflows/__swift-prebuild.yml with the appropriate swift
5+
1. Dispatch the [internal `swift-prebuild` workflow](https://github.com/github/semmle-code/actions/workflows/__swift-prebuild.yml) with the appropriate swift
66
tag.
7-
2. Dispatch the https://github.com/github/semmle-code/actions/workflows/__swift-prepare-resource-dir.yml with the
7+
2. Dispatch [internal `swift-prepare-resource-dir` workflow](https://github.com/github/semmle-code/actions/workflows/__swift-prepare-resource-dir.yml) with the
88
appropriate swift tag.
99
3. Once the jobs finish, staged artifacts are available
1010
at https://github.com/dsp-testing/codeql-swift-artifacts/releases. Copy and paste the sha256 within the `_override`

0 commit comments

Comments
 (0)