Skip to content

Commit b33732d

Browse files
committed
fix: avoid old LLVM release HTTP redirects
1 parent fb2a9a2 commit b33732d

File tree

6 files changed

+8
-6
lines changed

6 files changed

+8
-6
lines changed

dist/legacy/setup-cpp.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/legacy/setup-cpp.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/modern/setup-cpp.mjs

+1-1
Large diffs are not rendered by default.

dist/modern/setup-cpp.mjs.map

+1-1
Large diffs are not rendered by default.

src/llvm/assets-list.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ async function main() {
2121
for (let major = 1; major <= 9; major++) {
2222
for (let minor = 0; minor <= 9; minor++) {
2323
for (let patch = 0; patch <= 9; patch++) {
24-
const version = `${major}.${minor}.${patch}`
24+
const version = (major >= 3 && minor >= 4 && patch >= 1)
25+
? `${major}.${minor}`
26+
: `${major}.${minor}.${patch}`
2527
yield [version, `https://releases.llvm.org/${version}`] as [string, string]
2628
}
2729
}

src/llvm/llvm_url.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export async function getLLVMAssetURL(platform: string, arch: string, version: s
7171
)
7272

7373
if (websiteAsset !== undefined) {
74-
return `https://llvm.org/releases/${websiteAsset.tag}/${websiteAsset.name}`
74+
return `https://releases.llvm.org/${websiteAsset.tag}/${websiteAsset.name}`
7575
}
7676

7777
throw new Error(`No asset found for version ${version} matching ${keywords} and ${optionalKeywords}`)

0 commit comments

Comments
 (0)