build: follow naming conventing about binary postfix used by Xash3D (#671)
ci: add builds for apple silicon
This commit is contained in:
parent
b8fb2e8845
commit
abbc5bfc5a
3 changed files with 57 additions and 8 deletions
14
package.py
14
package.py
|
|
@ -81,7 +81,7 @@ class BotSign(object):
|
|||
return False
|
||||
|
||||
class BotPackage(object):
|
||||
def __init__(self, name: str, archive: str, artifact: dict, extra: bool = False):
|
||||
def __init__(self, name: str, archive: str, artifact: dict, extra: bool = False):
|
||||
self.name = name
|
||||
self.archive = archive
|
||||
self.artifact = artifact
|
||||
|
|
@ -133,7 +133,7 @@ class BotRelease(object):
|
|||
self.pkg_matrix.append (BotPackage('windows', 'exe', {'windows-x86': 'dll'}))
|
||||
self.pkg_matrix.append (BotPackage('linux', 'tar.xz', {'linux-x86': 'so'}))
|
||||
self.pkg_matrix.append (BotPackage('extras', 'zip',
|
||||
{'linux-aarch64': 'so',
|
||||
{'linux-arm64': 'so',
|
||||
'linux-amd64': 'so',
|
||||
'linux-x86-gcc': 'so',
|
||||
'windows-x86-gcc': 'dll',
|
||||
|
|
@ -141,6 +141,7 @@ class BotRelease(object):
|
|||
'windows-x86-msvc-xp': 'dll',
|
||||
'windows-amd64': 'dll',
|
||||
'darwin-x86': 'dylib',
|
||||
'darwin-arm64': 'dylib',
|
||||
}, extra=True))
|
||||
|
||||
def create_dirs(self):
|
||||
|
|
@ -255,7 +256,14 @@ class BotRelease(object):
|
|||
num_artifacts = len(pkg.artifact)
|
||||
|
||||
for artifact in pkg.artifact:
|
||||
binary = os.path.join(self.artifacts, artifact, f'{self.project}.{pkg.artifact[artifact]}')
|
||||
binary_name = self.project
|
||||
|
||||
if artifact.endswith('arm64'):
|
||||
binary_name = binary_name + '_arm64'
|
||||
elif artifact.endswith('amd64'):
|
||||
binary_name = binary_name + '_amd64'
|
||||
|
||||
binary = os.path.join(self.artifacts, artifact, f'{binary_name}.{pkg.artifact[artifact]}')
|
||||
binary_base = os.path.basename(binary)
|
||||
|
||||
if not os.path.exists(binary):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue