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

fix: platform detection #299

merged 1 commit into from Aug 26, 2021

Conversation

crazy-max
Copy link
Member

Fixes #297

cc @tenyo

@codecov
Copy link

codecov bot commented Aug 26, 2021

Codecov Report

Merging #299 (b3eddb8) into master (1bdedc7) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #299   +/-   ##
=======================================
  Coverage   85.86%   85.86%           
=======================================
  Files           4        4           
  Lines          92       92           
  Branches       17       17           
=======================================
  Hits           79       79           
  Misses          6        6           
  Partials        7        7           
Impacted Files Coverage Δ
src/installer.ts 94.11% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1bdedc7...b3eddb8. Read the comment docs.

@crazy-max crazy-max merged commit f9141d0 into master Aug 26, 2021
@crazy-max crazy-max deleted the fix-platform branch August 26, 2021 17:23
@tenyo
Copy link

tenyo commented Aug 26, 2021

@crazy-max Thanks so much for the quick fix! I just tried it with uses: goreleaser/goreleaser-action@master but unfortunately it's still pulling i386

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

@@ -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' : 'i386';
const arch = osArch == 'x64' ? 'x86_64' : true ? 'i386' : 0;
Copy link

Choose a reason for hiding this comment

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

You can see here it just evaluated the 'x32' to true

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh damn yes indeed :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

goreleaser-action downloads i386 version of installer on arm64
3 participants