Merge pull request #109 from aminya/lsb-release [skip ci]

This commit is contained in:
Amin Yahyaabadi 2022-07-27 12:27:53 -07:00 committed by GitHub
commit e82d38fa16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 11 additions and 6 deletions

View File

@ -20,8 +20,8 @@ jobs:
- ubuntu-22.04
- ubuntu-20.04
- ubuntu-18.04
- macos-12
- macos-11
- macos-10.15
node:
- 14 # installed on the images
pnpm:

View File

@ -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` 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

2
dist/setup_cpp.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
dist/setup_cpp.mjs vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,13 @@
import { getUbuntuVersion } from "ubuntu-version"
import which from "which"
import { setupAptPack } from "../setup/setupAptPack"
import { isUbuntu } from "./isUbuntu"
export async function ubuntuVersion(): Promise<number[] | null> {
if (isUbuntu()) {
if (which.sync("lsb_release", { nothrow: true }) === null) {
setupAptPack("lsb-release")
}
const versionSplitted = await getUbuntuVersion()
if (versionSplitted.length === 0) {