2021-09-16 19:36:35 +08:00
|
|
|
const DefaultVersions: Record<string, string> = {
|
2022-03-02 06:01:08 +08:00
|
|
|
llvm: "13.0.0", // https://github.com/llvm/llvm-project/releases
|
2022-01-30 07:46:53 +08:00
|
|
|
clangtidy: "13.0.0",
|
|
|
|
clangformat: "13.0.0",
|
2022-03-02 06:01:08 +08:00
|
|
|
ninja: "1.10.2", // https://github.com/ninja-build/ninja/releases
|
|
|
|
cmake: "3.22.2", // https://github.com/Kitware/CMake/releases
|
|
|
|
gcovr: "5.0", // https://pypi.org/project/gcovr/
|
|
|
|
conan: "1.45.0", // https://github.com/conan-io/conan/releases
|
|
|
|
meson: "0.61.2", // https://github.com/mesonbuild/meson/releases
|
2022-01-23 09:17:56 +08:00
|
|
|
python: "3.8.10",
|
2022-03-02 06:01:08 +08:00
|
|
|
kcov: "v39", // https://github.com/SimonKagstrom/kcov/releases
|
|
|
|
task: "3.11.0", // https://github.com/go-task/task/releases
|
|
|
|
doxygen: "1.9.1", // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=doxygen
|
2021-11-22 02:00:51 +08:00
|
|
|
gcc: process.platform === "win32" ? "11.2.0.07112021" : "11",
|
2021-09-16 19:36:35 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/** Get the default version if passed true or undefined, otherwise return the version itself */
|
|
|
|
export function getVersion(name: string, version: string | undefined) {
|
2021-09-16 19:57:37 +08:00
|
|
|
if (version === "true" || (version === undefined && name in DefaultVersions)) {
|
2021-09-16 19:36:35 +08:00
|
|
|
return DefaultVersions[name]
|
|
|
|
} else {
|
2021-09-18 01:12:33 +08:00
|
|
|
return version ?? ""
|
2021-09-16 19:36:35 +08:00
|
|
|
}
|
|
|
|
}
|