fix: platform detection v2 (#300)

Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2021-08-27 12:02:19 +02:00 committed by GitHub
parent f9141d00ae
commit bc087ef4b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

2
dist/index.js generated vendored
View File

@ -246,7 +246,7 @@ function getGoReleaser(distribution, version) {
exports.getGoReleaser = getGoReleaser;
const getFilename = (distribution) => {
const platform = osPlat == 'win32' ? 'Windows' : osPlat == 'darwin' ? 'Darwin' : 'Linux';
const arch = osArch == 'x64' ? 'x86_64' : true ? 'i386' : 0;
const arch = osArch == 'x64' ? 'x86_64' : osArch == 'x32' ? 'i386' : osArch;
const ext = osPlat == 'win32' ? 'zip' : 'tar.gz';
const suffix = pro.suffix(distribution);
return util.format('goreleaser%s_%s_%s.%s', suffix, platform, arch, ext);

View File

@ -47,7 +47,7 @@ export async function getGoReleaser(distribution: string, version: string): Prom
const getFilename = (distribution: string): string => {
const platform: string = osPlat == 'win32' ? 'Windows' : osPlat == 'darwin' ? 'Darwin' : 'Linux';
const arch: string = osArch == 'x64' ? 'x86_64' : 'x32' ? 'i386' : osArch;
const arch: string = osArch == 'x64' ? 'x86_64' : osArch == 'x32' ? 'i386' : osArch;
const ext: string = osPlat == 'win32' ? 'zip' : 'tar.gz';
const suffix: string = pro.suffix(distribution);
return util.format('goreleaser%s_%s_%s.%s', suffix, platform, arch, ext);