mirror of
https://github.com/crazy-max/ghaction-upx.git
synced 2025-09-05 01:25:48 -06:00
Add linux arm64 support
This commit is contained in:
parent
06e76b7e3d
commit
945e28744c
@ -62,12 +62,23 @@ export async function getUPX(version: string): Promise<string> {
|
|||||||
return exePath;
|
return exePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getLinuxPlatform(arch: string): string {
|
||||||
|
switch(arch) {
|
||||||
|
case 'x64':
|
||||||
|
return 'amd64_linux';
|
||||||
|
case 'arm64':
|
||||||
|
return 'arm64_linux';
|
||||||
|
default:
|
||||||
|
return 'i386_linux';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function getName(version: string): string {
|
function getName(version: string): string {
|
||||||
let platform = '';
|
let platform = '';
|
||||||
if (osPlat == 'win32') {
|
if (osPlat == 'win32') {
|
||||||
platform = osArch == 'x64' ? 'win64' : 'win32';
|
platform = osArch == 'x64' ? 'win64' : 'win32';
|
||||||
} else if (osPlat == 'linux') {
|
} else if (osPlat == 'linux') {
|
||||||
platform = osArch == 'x64' ? 'amd64_linux' : 'i386_linux';
|
platform = getLinuxPlatform(osArch);
|
||||||
}
|
}
|
||||||
return util.format('upx-%s-%s', version, platform);
|
return util.format('upx-%s-%s', version, platform);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user