Skip to content

Commit

Permalink
fix: fix default gcc version + fix Mingw arch
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Sep 3, 2024
1 parent 11fad2b commit a45740c
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 12 deletions.
4 changes: 2 additions & 2 deletions dist/actions/setup-cpp.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/actions/setup-cpp.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/legacy/setup-cpp.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/legacy/setup-cpp.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/modern/setup-cpp.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/modern/setup-cpp.js.map

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion src/gcc/gcc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ async function getGccPackageInfo(version: string, platform: NodeJS.Platform, arc
mingwAssets,
{
version,
arch,
arch: arch === "x64"
? "x86_64"
: arch === "ia32"
? "i386"
: arch,
filterName: (name) => name.endsWith(".7z"),
},
)
Expand Down
2 changes: 1 addition & 1 deletion src/versions/default_versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const DefaultVersions: Record<string, string | undefined> = {
doxygen: isArch() ? "1.11.0-4" : "1.11.0", // https://www.doxygen.nl/download.html // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=doxygen // https://formulae.brew.sh/formula/doxygen // https://archlinux.org/packages/extra/x86_64/doxygen/
gcc: process.platform === "win32"
? "14.2.0posix-18.1.8-12.0.0-ucrt-r1"
: undefined, // use the default version on Ubuntu, Fedora, Arch, macOS, etc.
: "", // use the default version on Ubuntu, Fedora, Arch, macOS, etc.
// mingw: isArch() ? "12.2.0-1" : "8", // https://archlinux.org/packages/extra/x86_64/mingw-w64-gcc/
powershell: "7.4.5", // https://github.com/PowerShell/PowerShell/releases/tag/v7.4.5
}
Expand Down
2 changes: 1 addition & 1 deletion src/versions/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function getVersion(name: string, version: string | undefined, osVersion:
if (isVersionDefault(version) && process.platform === "linux" && osVersion !== null && name in DefaultLinuxVersion) {
return getDefaultLinuxVersion(osVersion, DefaultLinuxVersion[name]!)
} else if (isVersionDefault(version) && name in DefaultVersions) {
return DefaultVersions[name]!
return DefaultVersions[name] ?? ""
} else if (version === "true") {
return ""
}
Expand Down

0 comments on commit a45740c

Please sign in to comment.