Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: platform detection #299

Merged
merged 1 commit into from Aug 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/installer.ts
Expand Up @@ -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' : 'i386';
const arch: string = osArch == 'x64' ? 'x86_64' : 'x32' ? 'i386' : osArch;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be

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);
Expand Down