Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _login(username, password):
update_json(path(SECRET_JSON), {'fbs_user': username, 'fbs_pass': password})
_LOG.info('Saved your username and password to %s.', SECRET_JSON)
_LOG.setLevel(logging.WARNING)
try:
clean()
freeze()
if is_windows() and _has_windows_codesigning_certificate():
sign()
installer()
if (is_windows() and _has_windows_codesigning_certificate()) or \
is_arch_linux() or is_fedora():
sign_installer()
repo()
finally:
_LOG.setLevel(log_level)
upload()
base_json = 'src/build/settings/base.json'
update_json(path(base_json), { 'version': release_version })
_LOG.info('Also, %s was updated with the new version.', base_json)
"revocation certificate stored as '/root/.gnupg/openpgp-revocs.d/",
".rev'",
include_bounds=False
)
pubkey = _snip(result.stdout,
'-----BEGIN PGP PUBLIC KEY BLOCK-----\n',
'-----END PGP PUBLIC KEY BLOCK-----\n')
privkey = _snip(result.stdout,
'-----BEGIN PGP PRIVATE KEY BLOCK-----\n',
'-----END PGP PRIVATE KEY BLOCK-----\n')
makedirs(path(_DEST_DIR), exist_ok=True)
pubkey_dest = _DEST_DIR + '/' + _PUBKEY_NAME
Path(path(pubkey_dest)).write_text(pubkey)
Path(path(_DEST_DIR + '/' + _PRIVKEY_NAME)).write_text(privkey)
update_json(path(BASE_JSON), {'gpg_key': key, 'gpg_name': name})
update_json(path(SECRET_JSON), {'gpg_pass': passphrase})
_LOG.info(
'Done. Created %s and ...%s. Also updated %s and ...secret.json with '
'the values you provided.', pubkey_dest, _PRIVKEY_NAME, BASE_JSON
)