mirror of https://github.com/aminya/setup-cpp
Merge pull request #109 from aminya/lsb-release [skip ci]
This commit is contained in:
commit
e82d38fa16
|
@ -20,8 +20,8 @@ jobs:
|
||||||
- ubuntu-22.04
|
- ubuntu-22.04
|
||||||
- ubuntu-20.04
|
- ubuntu-20.04
|
||||||
- ubuntu-18.04
|
- ubuntu-18.04
|
||||||
|
- macos-12
|
||||||
- macos-11
|
- macos-11
|
||||||
- macos-10.15
|
|
||||||
node:
|
node:
|
||||||
- 14 # installed on the images
|
- 14 # installed on the images
|
||||||
pnpm:
|
pnpm:
|
||||||
|
|
|
@ -8,7 +8,7 @@ Setting up a **cross-platform** environment for building and testing C++/C proje
|
||||||
|
|
||||||
`setup-cpp` can be used locally from terminal, from CI services like GitHub Actions and GitLab Pipelines, and inside containers like Docker.
|
`setup-cpp` can be used locally from terminal, from CI services like GitHub Actions and GitLab Pipelines, and inside containers like Docker.
|
||||||
|
|
||||||
`setup-cpp` is supported on many platforms. It is continuously tested on several configurations including Windows (11, 10, 2022, 2019), Linux (Ubuntu 22.04, Ubuntu 20.04, Fedora, ArchLinux), and macOS (10.15 and 11). `setup-cpp` is backed by unit tests for each tool and integration tests for compiling cpp projects.
|
`setup-cpp` is supported on many platforms. It is continuously tested on several configurations including Windows (11, 10, 2022, 2019), Linux (Ubuntu 22.04, Ubuntu 20.04, Fedora, ArchLinux), and macOS (12, 11, 10.15). `setup-cpp` is backed by unit tests for each tool and integration tests for compiling cpp projects.
|
||||||
|
|
||||||
# Features
|
# Features
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,8 +1,13 @@
|
||||||
import { getUbuntuVersion } from "ubuntu-version"
|
import { getUbuntuVersion } from "ubuntu-version"
|
||||||
|
import which from "which"
|
||||||
|
import { setupAptPack } from "../setup/setupAptPack"
|
||||||
import { isUbuntu } from "./isUbuntu"
|
import { isUbuntu } from "./isUbuntu"
|
||||||
|
|
||||||
export async function ubuntuVersion(): Promise<number[] | null> {
|
export async function ubuntuVersion(): Promise<number[] | null> {
|
||||||
if (isUbuntu()) {
|
if (isUbuntu()) {
|
||||||
|
if (which.sync("lsb_release", { nothrow: true }) === null) {
|
||||||
|
setupAptPack("lsb-release")
|
||||||
|
}
|
||||||
const versionSplitted = await getUbuntuVersion()
|
const versionSplitted = await getUbuntuVersion()
|
||||||
|
|
||||||
if (versionSplitted.length === 0) {
|
if (versionSplitted.length === 0) {
|
||||||
|
|
Loading…
Reference in New Issue