mirror of
https://github.com/crazy-max/ghaction-upx.git
synced 2025-09-03 08:35:46 -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;
|
||||
}
|
||||
|
||||
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 {
|
||||
let platform = '';
|
||||
if (osPlat == 'win32') {
|
||||
platform = osArch == 'x64' ? 'win64' : 'win32';
|
||||
} else if (osPlat == 'linux') {
|
||||
platform = osArch == 'x64' ? 'amd64_linux' : 'i386_linux';
|
||||
platform = getLinuxPlatform(osArch);
|
||||
}
|
||||
return util.format('upx-%s-%s', version, platform);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user