fix: platform detection (#299)

Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2021-08-26 19:23:54 +02:00 committed by GitHub
parent 1bdedc7bba
commit f9141d00ae
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; exports.getGoReleaser = getGoReleaser;
const getFilename = (distribution) => { const getFilename = (distribution) => {
const platform = osPlat == 'win32' ? 'Windows' : osPlat == 'darwin' ? 'Darwin' : 'Linux'; const platform = osPlat == 'win32' ? 'Windows' : osPlat == 'darwin' ? 'Darwin' : 'Linux';
const arch = osArch == 'x64' ? 'x86_64' : 'i386'; const arch = osArch == 'x64' ? 'x86_64' : true ? 'i386' : 0;
const ext = osPlat == 'win32' ? 'zip' : 'tar.gz'; const ext = osPlat == 'win32' ? 'zip' : 'tar.gz';
const suffix = pro.suffix(distribution); const suffix = pro.suffix(distribution);
return util.format('goreleaser%s_%s_%s.%s', suffix, platform, arch, ext); 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 getFilename = (distribution: string): string => {
const platform: string = osPlat == 'win32' ? 'Windows' : osPlat == 'darwin' ? 'Darwin' : 'Linux'; const platform: string = osPlat == 'win32' ? 'Windows' : osPlat == 'darwin' ? 'Darwin' : 'Linux';
const arch: string = osArch == 'x64' ? 'x86_64' : 'i386'; const arch: string = osArch == 'x64' ? 'x86_64' : 'x32' ? 'i386' : osArch;
const ext: string = osPlat == 'win32' ? 'zip' : 'tar.gz'; const ext: string = osPlat == 'win32' ? 'zip' : 'tar.gz';
const suffix: string = pro.suffix(distribution); const suffix: string = pro.suffix(distribution);
return util.format('goreleaser%s_%s_%s.%s', suffix, platform, arch, ext); return util.format('goreleaser%s_%s_%s.%s', suffix, platform, arch, ext);