mirror of https://github.com/aminya/setup-cpp
fix: set older default only for ubuntu 18
This commit is contained in:
parent
870172d8c1
commit
d321271fc9
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -33,23 +33,23 @@ describe("syncVersion", () => {
|
|||
expect(syncVersions(opts, llvmTools)).toBe(true)
|
||||
expect(opts.llvm).toBe(opts.clangtidy)
|
||||
})
|
||||
})
|
||||
|
||||
describe("getVersion", () => {
|
||||
it("gcovr", () => {
|
||||
expect(getVersion("gcovr", "5.0")).toBe("5.0")
|
||||
if (process.platform === "linux") {
|
||||
expect(getVersion("gcovr", "true", [20, 4])).toBe("5.1")
|
||||
expect(getVersion("gcovr", "true", [18, 4])).toBe("5.0")
|
||||
}
|
||||
})
|
||||
describe("getVersion", () => {
|
||||
it("gcovr", () => {
|
||||
expect(getVersion("gcovr", "5.0")).toBe("5.0")
|
||||
if (process.platform === "linux") {
|
||||
expect(getVersion("gcovr", "true", [20, 4])).toBe("5.1")
|
||||
expect(getVersion("gcovr", "true", [18, 4])).toBe("5.0")
|
||||
}
|
||||
})
|
||||
|
||||
it("llvm", () => {
|
||||
expect(getVersion("llvm", "13.0.0")).toBe("13.0.0")
|
||||
if (process.platform === "linux") {
|
||||
expect(getVersion("llvm", "true", [20, 4])).toBe("13.0.0-ubuntu-20.04")
|
||||
expect(getVersion("llvm", "true", [18, 4])).toBe("13.0.1-ubuntu-18.04")
|
||||
expect(getVersion("llvm", "true", [16, 4])).toBe("13.0.0-ubuntu-16.04")
|
||||
}
|
||||
})
|
||||
it("llvm", () => {
|
||||
expect(getVersion("llvm", "13.0.0")).toBe("13.0.0")
|
||||
if (process.platform === "linux") {
|
||||
expect(getVersion("llvm", "true", [20, 4])).toBe("13.0.0-ubuntu-20.04")
|
||||
expect(getVersion("llvm", "true", [18, 4])).toBe("13.0.1-ubuntu-18.04")
|
||||
expect(getVersion("llvm", "true", [16, 4])).toBe("13.0.0-ubuntu-16.04")
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
|
@ -29,9 +29,9 @@ export function getVersion(name: string, version: string | undefined, osVersion:
|
|||
if (osVersion[0] < 20) {
|
||||
switch (name) {
|
||||
case "gcovr":
|
||||
return "5.0"
|
||||
return osVersion[0] === 18 ? "5.0" : "" /* pip default */
|
||||
case "meson":
|
||||
return "0.61.4"
|
||||
return osVersion[0] === 18 ? "0.61.4" : "" /* pip default */
|
||||
case "doxygen":
|
||||
return "1.9.1"
|
||||
default: {
|
||||
|
|
Loading…
Reference in New Issue