2022-01-31 10:25:54 +08:00
|
|
|
import { addPath } from "@actions/core"
|
2022-01-31 06:40:11 +08:00
|
|
|
import { setupAptPack } from "../utils/setup/setupAptPack"
|
|
|
|
import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
|
|
|
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
|
|
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
|
|
export function setupMake(version: string, _setupDir: string, _arch: string) {
|
|
|
|
switch (process.platform) {
|
|
|
|
case "win32": {
|
|
|
|
return setupChocoPack("make", version)
|
|
|
|
}
|
|
|
|
case "darwin": {
|
2022-01-31 10:25:54 +08:00
|
|
|
setupBrewPack("make", version)
|
|
|
|
addPath("/usr/local/opt/make/libexec/gnubin")
|
|
|
|
return { binDir: "/usr/local/opt/make/libexec/gnubin" }
|
2022-01-31 06:40:11 +08:00
|
|
|
}
|
|
|
|
case "linux": {
|
|
|
|
return setupAptPack("make", version)
|
|
|
|
}
|
|
|
|
default: {
|
|
|
|
throw new Error(`Unsupported platform`)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|