mirror of
https://github.com/nomic-ai/gpt4all
synced 2024-11-08 07:10:32 +00:00
Allow sha1
This commit is contained in:
parent
220fe0cfd4
commit
e6c48d1b85
@ -16,8 +16,9 @@ import click
|
|||||||
@click.command()
|
@click.command()
|
||||||
@click.option('--input-dmg', required=True, help='Path to the input DMG file.')
|
@click.option('--input-dmg', required=True, help='Path to the input DMG file.')
|
||||||
@click.option('--output-dmg', required=True, help='Path to the output signed DMG file.')
|
@click.option('--output-dmg', required=True, help='Path to the output signed DMG file.')
|
||||||
@click.option('--signing-identity', required=True, help='Signing identity (Developer ID Installer).')
|
@click.option('--sha1-hash', help='SHA-1 hash of the Developer ID Installer certificate')
|
||||||
def sign_dmg(input_dmg, output_dmg, signing_identity):
|
@click.option('--signing-identity', help='Signing identity (Developer ID Installer).')
|
||||||
|
def sign_dmg(input_dmg: str, output_dmg: str, signing_identity: str, sha1_hash: Optional[str]) -> None:
|
||||||
# Mount the input DMG
|
# Mount the input DMG
|
||||||
mount_point = tempfile.mkdtemp()
|
mount_point = tempfile.mkdtemp()
|
||||||
subprocess.run(['hdiutil', 'attach', input_dmg, '-mountpoint', mount_point])
|
subprocess.run(['hdiutil', 'attach', input_dmg, '-mountpoint', mount_point])
|
||||||
@ -47,7 +48,7 @@ def sign_dmg(input_dmg, output_dmg, signing_identity):
|
|||||||
'--verbose',
|
'--verbose',
|
||||||
'--options', 'runtime',
|
'--options', 'runtime',
|
||||||
'--timestamp',
|
'--timestamp',
|
||||||
'--sign', signing_identity,
|
'--sign', sha1_hash or signing_identity,
|
||||||
app_bundle
|
app_bundle
|
||||||
], check=True)
|
], check=True)
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user