mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-01 00:53:47 +00:00
* create constant for number of releases per os * sort releases * Apply suggestions from code review * change requests * fix build error * cleanup * fix: typo & prettier * refactor sort function * cleanup unnecessary changes * fix: getReleaseArch case * fix sort * prettier Co-authored-by: Paul Wackerow <54227730+wackerow@users.noreply.github.com> Co-authored-by: Nicolás Quiroz <nh.quiroz@gmail.com>
28 lines
622 B
TypeScript
28 lines
622 B
TypeScript
export const getReleaseArch = (filename: string) => {
|
|
const arch = filename.includes('alltools') ? filename.split('-')[3] : filename.split('-')[2];
|
|
|
|
switch (arch) {
|
|
case '386':
|
|
return '32-bit';
|
|
case 'amd64':
|
|
return '64-bit';
|
|
case 'arm5':
|
|
return 'ARMv5';
|
|
case 'arm6':
|
|
return 'ARMv6';
|
|
case 'arm7':
|
|
return 'ARMv7';
|
|
case 'arm64':
|
|
return 'ARM64';
|
|
case 'mips':
|
|
return 'MIPS32';
|
|
case 'mipsle':
|
|
return 'MIPS32(le)';
|
|
case 'mips64':
|
|
return 'MIPS64';
|
|
case 'mips64le':
|
|
return 'MIPS64(le)';
|
|
default:
|
|
return 'all';
|
|
}
|
|
};
|