Skip to content

Commit 86e88d8

Browse files
committed
fix: use older default versions for gcovr, meson, doxygen on ubuntu 18
1 parent af7a395 commit 86e88d8

File tree

3 files changed

+19
-6
lines changed

3 files changed

+19
-6
lines changed

dist/setup_cpp.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/setup_cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/default_versions.ts

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,28 @@ const DefaultVersions: Record<string, string> = {
1919
/** Get the default version if passed true or undefined, otherwise return the version itself */
2020
export function getVersion(name: string, version: string | undefined, osVersion: number[] | null = null) {
2121
if (useDefault(version, name)) {
22-
// llvm on linux
23-
if (process.platform === "linux" && ["llvm", "clangtidy", "clangformat"].includes(name)) {
24-
// choose the default version for llvm based on ubuntu
25-
if (osVersion !== null) {
22+
// choose the default linux version based on ubuntu version
23+
if (process.platform === "linux" && osVersion !== null) {
24+
if (["llvm", "clangtidy", "clangformat"].includes(name)) {
2625
if ([20, 18, 16].includes(osVersion[0]) && osVersion[1] === 4) {
2726
return `${osVersion[0] === 18 ? "13.0.1" : "13.0.0"}-ubuntu-${osVersion[0]}.0${osVersion[1]}`
2827
}
2928
}
29+
if (osVersion[0] < 20) {
30+
switch (name) {
31+
case "gcovr":
32+
return "5.0"
33+
case "meson":
34+
return "0.61.4"
35+
case "doxygen":
36+
return "1.9.1"
37+
default: {
38+
// nothing
39+
}
40+
}
41+
}
3042
}
43+
3144
// anything else
3245
return DefaultVersions[name]
3346
} else {

0 commit comments

Comments
 (0)