mirror of https://github.com/aminya/setup-cpp
feat: add default version for msvc
This commit is contained in:
parent
04b70139f6
commit
b55bf22468
|
@ -121,7 +121,7 @@ export async function main(): Promise<number> {
|
|||
// setup brew
|
||||
const brewVersion = maybeGetInput("brew")
|
||||
if (brewVersion !== undefined) {
|
||||
await setupBrew()
|
||||
setupBrew()
|
||||
}
|
||||
|
||||
// setup ccache
|
||||
|
|
|
@ -4,7 +4,7 @@ import { exportVariable } from "@actions/core"
|
|||
import { existsSync } from "fs"
|
||||
import { arch as osArch } from "os"
|
||||
|
||||
type MSVCVersion = "2015" | "2017" | "2019" | string
|
||||
type MSVCVersion = "2015" | "2017" | "2019" | "true" | string
|
||||
|
||||
function getArch(arch: string): string {
|
||||
switch (arch) {
|
||||
|
@ -22,13 +22,16 @@ function getArch(arch: string): string {
|
|||
}
|
||||
}
|
||||
|
||||
const default_msvc_version = "2019"
|
||||
|
||||
export async function setupMSVC(
|
||||
version: MSVCVersion,
|
||||
versionGiven: MSVCVersion,
|
||||
sdk?: string,
|
||||
uwp?: boolean,
|
||||
spectre?: boolean,
|
||||
arch = osArch()
|
||||
): Promise<void> {
|
||||
const version = versionGiven === "true" ? default_msvc_version : versionGiven
|
||||
if (process.platform !== "win32") {
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue