mirror of
https://github.com/crazy-max/ghaction-upx.git
synced 2024-11-21 01:46:08 -07:00
arm platform support
This commit is contained in:
parent
5deb7f8ace
commit
ff965ece8d
|
@ -63,11 +63,30 @@ export async function getUPX(version: string): Promise<string> {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getName(version: string): string {
|
function getName(version: string): string {
|
||||||
let platform = '';
|
let platform: string;
|
||||||
if (osPlat == 'win32') {
|
switch (osArch) {
|
||||||
platform = osArch == 'x64' ? 'win64' : 'win32';
|
case 'x64': {
|
||||||
} else if (osPlat == 'linux') {
|
platform = osPlat === 'win32' ? 'win64' : 'amd64_' + osPlat;
|
||||||
platform = osArch == 'x64' ? 'amd64_linux' : 'i386_linux';
|
break;
|
||||||
|
}
|
||||||
|
case 'x32': {
|
||||||
|
platform = osPlat === 'win32' ? 'win32' : 'i386_' + osPlat;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 'arm': {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
const arm_version = (process.config.variables as any).arm_version;
|
||||||
|
if (arm_version === '7') {
|
||||||
|
platform = 'armeb_' + osPlat;
|
||||||
|
} else {
|
||||||
|
platform = 'arm_' + osPlat;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
platform = osArch + '_' + osPlat;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return util.format('upx-%s-%s', version, platform);
|
return util.format('upx-%s-%s', version, platform);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user