mirror of https://github.com/aminya/setup-cpp
chore: rename functions for clarification
This commit is contained in:
parent
e522160611
commit
e08ce49f07
|
@ -1,5 +1,5 @@
|
||||||
import { setupPip } from "../utils/setup/setupPip"
|
import { setupPipPack } from "../utils/setup/setupPipPack"
|
||||||
|
|
||||||
export async function setupConan(version?: string) {
|
export async function setupConan(version?: string) {
|
||||||
await setupPip("conan", version)
|
await setupPipPack("conan", version)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { setupPip } from "../utils/setup/setupPip"
|
import { setupPipPack } from "../utils/setup/setupPipPack"
|
||||||
|
|
||||||
export async function setupGcovr(version?: string) {
|
export async function setupGcovr(version?: string) {
|
||||||
await setupPip("gcovr", version)
|
await setupPipPack("gcovr", version)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { setupPip } from "../utils/setup/setupPip"
|
import { setupPipPack } from "../utils/setup/setupPipPack"
|
||||||
|
|
||||||
export async function setupMeson(version?: string) {
|
export async function setupMeson(version?: string) {
|
||||||
await setupPip("meson", version)
|
await setupPipPack("meson", version)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { exec } from "@actions/exec"
|
import { exec } from "@actions/exec"
|
||||||
|
|
||||||
/** A function that installs a package using apt */
|
/** A function that installs a package using apt */
|
||||||
export async function setupApt(name: string, version?: string, updateRepositories: boolean = true) {
|
export async function setupAptPack(name: string, version?: string, updateRepositories: boolean = true) {
|
||||||
if (updateRepositories) {
|
if (updateRepositories) {
|
||||||
await exec("apt-get", ["update"])
|
await exec("apt-get", ["update"])
|
||||||
}
|
}
|
|
@ -3,7 +3,7 @@ import which from "which"
|
||||||
import { setupChocolatey } from "../../chocolatey/chocolatey"
|
import { setupChocolatey } from "../../chocolatey/chocolatey"
|
||||||
|
|
||||||
/** A function that installs a package using choco */
|
/** A function that installs a package using choco */
|
||||||
export async function setupChoco(name: string, version?: string) {
|
export async function setupChocoPack(name: string, version?: string) {
|
||||||
if (which.sync("choco", { nothrow: true }) === null) {
|
if (which.sync("choco", { nothrow: true }) === null) {
|
||||||
await setupChocolatey()
|
await setupChocolatey()
|
||||||
}
|
}
|
|
@ -3,7 +3,7 @@ import which from "which"
|
||||||
import { addPath, startGroup, endGroup } from "@actions/core"
|
import { addPath, startGroup, endGroup } from "@actions/core"
|
||||||
|
|
||||||
/** A function that installs a package using pip */
|
/** A function that installs a package using pip */
|
||||||
export async function setupPip(name: string, version?: string) {
|
export async function setupPipPack(name: string, version?: string) {
|
||||||
// check if it exists
|
// check if it exists
|
||||||
const pip = which.sync("pip3", { nothrow: true }) !== null ? "pip3" : "pip"
|
const pip = which.sync("pip3", { nothrow: true }) !== null ? "pip3" : "pip"
|
||||||
|
|
Loading…
Reference in New Issue