Skip to content

Commit bcc7fc2

Browse files
committed
fix: rename installApkPack for consistency
1 parent d04bcbf commit bcc7fc2

File tree

19 files changed

+35
-35
lines changed

19 files changed

+35
-35
lines changed

dist/legacy/setup-cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/modern/setup-cpp.mjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/setup-alpine/src/install-package.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export type InstallationInfo = {
2323
* @param update Whether to update the package index before installing
2424
* @returns The installation information
2525
*/
26-
export async function installApkPackage(packages: ApkPackage[], update = false): Promise<InstallationInfo> {
26+
export async function installApkPack(packages: ApkPackage[], update = false): Promise<InstallationInfo> {
2727
// Check if apk is available
2828
if (!(await hasApk())) {
2929
throw new Error("apk is not available on this system")

src/bazel/bazel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { execRoot } from "admina"
2-
import { hasApk, installApkPackage } from "setup-alpine"
2+
import { hasApk, installApkPack } from "setup-alpine"
33
import { addAptKeyViaURL, installAptPack } from "setup-apt"
44
import { installBrewPack } from "setup-brew"
55
import { getDebArch } from "../utils/env/arch.js"
@@ -42,7 +42,7 @@ export async function setupBazel(version: string, _setupDir: string, _arch: stri
4242
])
4343
return installAptPack([{ name: "bazel", version }], true)
4444
} else if (await hasApk()) {
45-
return installApkPackage([{ name: "bazel", version }], true)
45+
return installApkPack([{ name: "bazel", version }], true)
4646
}
4747
throw new Error("Unsupported linux distribution")
4848
}

src/ccache/ccache.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { hasApk, installApkPackage } from "setup-alpine"
1+
import { hasApk, installApkPack } from "setup-alpine"
22
import { installAptPack } from "setup-apt"
33
import { installBrewPack } from "setup-brew"
44
import { hasDnf } from "../utils/env/hasDnf.js"
@@ -25,7 +25,7 @@ export async function setupCcache(version: string, _setupDir: string, _arch: str
2525
} else if (isUbuntu()) {
2626
return installAptPack([{ name: "ccache", version }])
2727
} else if (await hasApk()) {
28-
return installApkPackage([{ name: "ccache", version }])
28+
return installApkPack([{ name: "ccache", version }])
2929
}
3030
throw new Error("Unsupported linux distribution")
3131
}

src/cppcheck/cppcheck.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { addPath } from "envosman"
2-
import { hasApk, installApkPackage } from "setup-alpine"
2+
import { hasApk, installApkPack } from "setup-alpine"
33
import { installAptPack } from "setup-apt"
44
import { installBrewPack } from "setup-brew"
55
import { rcOptions } from "../cli-options.js"
@@ -29,7 +29,7 @@ export async function setupCppcheck(version: string | undefined, _setupDir: stri
2929
} else if (isUbuntu()) {
3030
return installAptPack([{ name: "cppcheck", version }])
3131
} else if (await hasApk()) {
32-
return installApkPackage([{ name: "cppcheck", version }])
32+
return installApkPack([{ name: "cppcheck", version }])
3333
}
3434
throw new Error("Unsupported linux distribution")
3535
}

src/doxygen/doxygen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { addPath } from "envosman"
44
import { pathExists } from "path-exists"
55
import { addExeExt } from "patha"
66
import retry from "retry-as-promised"
7-
import { hasApk, installApkPackage } from "setup-alpine"
7+
import { hasApk, installApkPack } from "setup-alpine"
88
import { installAptPack } from "setup-apt"
99
import { installBrewPack } from "setup-brew"
1010
import { rcOptions } from "../cli-options.js"
@@ -112,7 +112,7 @@ async function setupLinuxDoxygen(version: string, setupDir: string, arch: string
112112
} else if (isUbuntu()) {
113113
return await installAptPack([{ name: "doxygen", version, fallBackToLatest: arm64.includes(arch) }])
114114
} else if (await hasApk()) {
115-
return installApkPackage([{ name: "doxygen", version }])
115+
return installApkPack([{ name: "doxygen", version }])
116116
} else {
117117
throw new Error("Unsupported linux distributions")
118118
}

src/gcc/gcc.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { readdir } from "fs/promises"
1010
import { pathExists } from "path-exists"
1111
import { addExeExt } from "patha"
1212
import semverMajor from "semver/functions/major"
13-
import { hasApk, installApkPackage } from "setup-alpine"
13+
import { hasApk, installApkPack } from "setup-alpine"
1414
import { addUpdateAlternativesToRc, installAptPack } from "setup-apt"
1515
import { installBrewPack } from "setup-brew"
1616
import { rcOptions } from "../cli-options.js"
@@ -48,7 +48,7 @@ export async function setupGcc(version: string, setupDir: string, arch: string,
4848
{ name: "libstdc++-devel" },
4949
])
5050
} else if (await hasApk()) {
51-
installationInfo = await installApkPackage([{ name: "gcc", version }, { name: "g++", version }])
51+
installationInfo = await installApkPack([{ name: "gcc", version }, { name: "g++", version }])
5252
} else if (isUbuntu()) {
5353
if (version === "") {
5454
// the default version

src/gcc/mingw.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { pathExists } from "path-exists"
88
import { addExeExt } from "patha"
99
import semverCoerce from "semver/functions/coerce.js"
1010
import semverSatisfies from "semver/functions/satisfies.js"
11-
import { hasApk, installApkPackage } from "setup-alpine"
11+
import { hasApk, installApkPack } from "setup-alpine"
1212
import { installAptPack } from "setup-apt"
1313
import { rcOptions } from "../cli-options.js"
1414
import { loadAssetList, matchAsset } from "../utils/asset/load-assets.js"
@@ -47,7 +47,7 @@ export async function setupMingw(version: string, setupDir: string, arch: string
4747
} else if (isUbuntu()) {
4848
installationInfo = await installAptPack([{ name: "mingw-w64", version }])
4949
} else if (await hasApk()) {
50-
installationInfo = await installApkPackage([{ name: "mingw-w64", version }])
50+
installationInfo = await installApkPack([{ name: "mingw-w64", version }])
5151
} else {
5252
throw new Error(`Unsupported Linux distro for ${arch}`)
5353
}

src/git/git.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { existsSync } from "fs"
22
import { info, warning } from "ci-log"
33
import { addPath } from "envosman"
4-
import { hasApk, installApkPackage } from "setup-alpine"
4+
import { hasApk, installApkPack } from "setup-alpine"
55
import { installAptPack } from "setup-apt"
66
import { installBrewPack } from "setup-brew"
77
import which from "which"
@@ -41,7 +41,7 @@ export async function setupGit(version: string, _setupDir: string, _arch: string
4141
} else if (isUbuntu()) {
4242
return installAptPack([{ name: "git", version }])
4343
} else if (await hasApk()) {
44-
return installApkPackage([{ name: "git", version }])
44+
return installApkPack([{ name: "git", version }])
4545
}
4646
throw new Error("Unsupported linux distribution")
4747
}

src/graphviz/graphviz.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { addPath } from "envosman"
2-
import { hasApk, installApkPackage } from "setup-alpine"
2+
import { hasApk, installApkPack } from "setup-alpine"
33
import { installAptPack } from "setup-apt"
44
import { installBrewPack } from "setup-brew"
55
import { rcOptions } from "../cli-options.js"
@@ -29,7 +29,7 @@ export async function setupGraphviz(version: string, _setupDir: string, _arch: s
2929
} else if (isUbuntu()) {
3030
return installAptPack([{ name: "graphviz", version }])
3131
} else if (await hasApk()) {
32-
return installApkPackage([{ name: "graphviz", version }])
32+
return installApkPack([{ name: "graphviz", version }])
3333
}
3434
throw new Error("Unsupported linux distribution")
3535
}

src/llvm/llvm_apk_installer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import path, { join } from "path"
22
import { fileURLToPath } from "url"
33
import { execRootSync } from "admina"
44
import { info } from "ci-log"
5-
import { type InstallationInfo, hasApk, installApkPackage } from "setup-alpine"
5+
import { type InstallationInfo, hasApk, installApkPack } from "setup-alpine"
66
import { majorLLVMVersion } from "./utils.ts"
77

88
const dirname = typeof __dirname === "string" ? __dirname : path.dirname(fileURLToPath(import.meta.url))
@@ -36,5 +36,5 @@ export async function trySetupLLVMApk(
3636
}
3737

3838
export function setupLLVMApk(version: string): Promise<InstallationInfo> {
39-
return installApkPackage([{ name: "llvm", version }])
39+
return installApkPack([{ name: "llvm", version }])
4040
}

src/make/make.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { join } from "path"
22
import { addPath } from "envosman"
3-
import { hasApk, installApkPackage } from "setup-alpine"
3+
import { hasApk, installApkPack } from "setup-alpine"
44
import { installAptPack } from "setup-apt"
55
import { getBrewDir, installBrewPack } from "setup-brew"
66
import { rcOptions } from "../cli-options.js"
@@ -32,7 +32,7 @@ export async function setupMake(version: string, _setupDir: string, _arch: strin
3232
} else if (isUbuntu()) {
3333
return installAptPack([{ name: "make", version }])
3434
} else if (await hasApk()) {
35-
return installApkPackage([{ name: "make", version }])
35+
return installApkPack([{ name: "make", version }])
3636
}
3737
throw new Error("Unsupported linux distribution")
3838
}

src/powershell/powershell.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { execRootSync } from "admina"
22
import { error } from "ci-log"
33
import { addPath } from "envosman"
44
import { addExeExt } from "patha"
5-
import { hasApk, installApkPackage } from "setup-alpine"
5+
import { hasApk, installApkPack } from "setup-alpine"
66
import { installAptPack } from "setup-apt"
77
import { installBrewPack } from "setup-brew"
88
import { rcOptions } from "../cli-options.js"
@@ -115,7 +115,7 @@ export async function setupPowershellSystem(version: string | undefined, _setupD
115115

116116
return installAptPack([{ name: "powershell", version }], true)
117117
} else if (await hasApk()) {
118-
return installApkPackage([{ name: "powershell", version }])
118+
return installApkPack([{ name: "powershell", version }])
119119
}
120120
throw new Error("Unsupported linux distribution")
121121
}

src/python/python.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { execa } from "execa"
1010
import { readdir } from "fs/promises"
1111
import { pathExists } from "path-exists"
1212
import { addExeExt } from "patha"
13-
import { hasApk, installApkPackage } from "setup-alpine"
13+
import { hasApk, installApkPack } from "setup-alpine"
1414
import { installAptPack, isAptPackInstalled } from "setup-apt"
1515
import { installBrewPack } from "setup-brew"
1616
import which from "which"
@@ -234,7 +234,7 @@ async function setupPythonSystem(setupDir: string, version: string) {
234234
} else if (isUbuntu()) {
235235
installInfo = await installAptPack([{ name: "python3", version }, { name: "python-is-python3" }])
236236
} else if (await hasApk()) {
237-
installInfo = await installApkPackage([{ name: "python3", version }])
237+
installInfo = await installApkPack([{ name: "python3", version }])
238238
} else {
239239
throw new Error("Unsupported linux distributions")
240240
}

src/sccache/sccache.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { hasApk, installApkPackage } from "setup-alpine"
1+
import { hasApk, installApkPack } from "setup-alpine"
22
import { installAptPack } from "setup-apt"
33
import { installBrewPack } from "setup-brew"
44
import { getUbuntuVersion } from "ubuntu-version"
@@ -18,7 +18,7 @@ export async function setupSccache(version: string, _setupDir: string, _arch: st
1818
return installAptPack([{ name: "sccache", version }])
1919
}
2020
} else if (await hasApk()) {
21-
return installApkPackage([{ name: "sccache", version }])
21+
return installApkPack([{ name: "sccache", version }])
2222
}
2323

2424
return installBrewPack("sccache", version)

src/sevenzip/sevenzip.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { hasApk, installApkPackage } from "setup-alpine"
1+
import { hasApk, installApkPack } from "setup-alpine"
22
import { installAptPack } from "setup-apt"
33
import { installBrewPack } from "setup-brew"
44
import { hasDnf } from "../utils/env/hasDnf.js"
@@ -28,7 +28,7 @@ export async function setupSevenZip(version: string, _setupDir: string, _arch: s
2828
} else if (isUbuntu()) {
2929
return installAptPack([{ name: "p7zip-full", version }])
3030
} else if (await hasApk()) {
31-
return installApkPackage([{ name: "p7zip", version }])
31+
return installApkPack([{ name: "p7zip", version }])
3232
}
3333
throw new Error("Unsupported linux distribution")
3434
}

src/utils/setup/setupPipPack.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import memoize from "memoizee"
88
import { mkdirp } from "mkdirp"
99
import { pathExists } from "path-exists"
1010
import { addExeExt } from "patha"
11-
import { hasApk, installApkPackage } from "setup-alpine"
11+
import { hasApk, installApkPack } from "setup-alpine"
1212
import { installAptPack } from "setup-apt"
1313
import { installBrewPack } from "setup-brew"
1414
import { untildifyUser } from "untildify-user"
@@ -295,7 +295,7 @@ export async function setupPipPackSystem(name: string, givenAddPythonPrefix?: bo
295295
} else if (isUbuntu()) {
296296
return installAptPack([{ name: addPythonPrefix ? `python3-${name}` : name }])
297297
} else if (await hasApk()) {
298-
return installApkPackage([{ name: addPythonPrefix ? `py3-${name}` : name }])
298+
return installApkPack([{ name: addPythonPrefix ? `py3-${name}` : name }])
299299
}
300300
} else if (process.platform === "darwin") {
301301
// brew doesn't have venv

src/vcpkg/vcpkg.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { addEnv, addPath } from "envosman"
55
import { execa } from "execa"
66
import { pathExists } from "path-exists"
77
import { addShExt, addShRelativePrefix } from "patha"
8-
import { hasApk, installApkPackage } from "setup-alpine"
8+
import { hasApk, installApkPack } from "setup-alpine"
99
import { installAptPack } from "setup-apt"
1010
import which from "which"
1111
import { rcOptions } from "../cli-options.js"
@@ -56,7 +56,7 @@ export async function setupVcpkg(version: string, setupDir: string, arch: string
5656
{ name: "pkg-config" },
5757
])
5858
} else if (await hasApk()) {
59-
await installApkPackage([
59+
await installApkPack([
6060
{ name: "curl" },
6161
{ name: "zip" },
6262
{ name: "unzip" },

0 commit comments

Comments
 (0)