|
1 | 1 | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
2 | 2 | load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
|
3 | 3 |
|
| 4 | +_swift_prebuilt_version = "swift-5.6-RELEASE.42271.54" |
| 5 | +_swift_sha_map = { |
| 6 | + "linux": "92b26fbbc45f812b0581385cc81470ab636fed9cff460052aa2173de765ddef4", |
| 7 | + "macos-x86_64": "b24f609c7868c1709e1e552e3b394664014e6a7f1e097522db80deb359bbcd2f", |
| 8 | +} |
| 9 | + |
| 10 | +_swift_arch_map = { |
| 11 | + "linux": "linux", |
| 12 | + "macos-x86_64": "darwin_x86_64", |
| 13 | +} |
| 14 | + |
4 | 15 | def codeql_workspace():
|
5 |
| - for arch, repo_arch, sha256 in ( |
6 |
| - ("linux", "linux", "48e39228e49aa560f0c1e504c4f9d488e28278b31fedc8271ce4cf807d9f7791"), |
7 |
| - ("darwin_x86_64", "macos-x86_64", "8f1e8e9cfb4391b3fbc0b90da548a7e660f302b1a8551e6640e8a944eb377028"), |
8 |
| - ): |
| 16 | + for repo_arch, arch in _swift_arch_map.items(): |
| 17 | + sha256 = _swift_sha_map[repo_arch] |
| 18 | + |
9 | 19 | http_archive(
|
10 | 20 | name = "swift_prebuilt_%s" % arch,
|
11 |
| - url = "https://github.com/dsp-testing/codeql-swift-artifacts/releases/download/swift-5.6-RELEASE.42271.49/swift-prebuilt-%s.zip" % repo_arch, |
12 |
| - build_file = "@ql//swift/extractor:BUILD.swift-prebuilt.bazel", |
| 21 | + url = "https://github.com/dsp-testing/codeql-swift-artifacts/releases/download/%s/swift-prebuilt-%s.zip" % ( |
| 22 | + _swift_prebuilt_version, |
| 23 | + repo_arch, |
| 24 | + ), |
| 25 | + build_file = "@codeql//swift/extractor:BUILD.swift-prebuilt.bazel", |
13 | 26 | sha256 = sha256,
|
14 | 27 | )
|
15 | 28 |
|
|
0 commit comments