mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-02-07 12:50:32 +03:00
Use an ssh config file to configure package uploading
[skip ci]
This commit is contained in:
parent
9bfde497e5
commit
8a6b280d86
|
@ -497,7 +497,7 @@ def setup_ssh():
|
||||||
|
|
||||||
# Write SSH Private Key file from environment variable
|
# Write SSH Private Key file from environment variable
|
||||||
pkey = pkey.replace(' ', '\n')
|
pkey = pkey.replace(' ', '\n')
|
||||||
with (opt.clone_dir / 'id_rsa').open('w') as f:
|
with (opt.clone_dir / 'data/id_rsa-psycopg-upload').open('w') as f:
|
||||||
f.write(
|
f.write(
|
||||||
f"""\
|
f"""\
|
||||||
-----BEGIN RSA PRIVATE KEY-----
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
|
@ -516,16 +516,11 @@ def upload_packages():
|
||||||
# Upload built artifacts
|
# Upload built artifacts
|
||||||
logger.info("uploading artifacts")
|
logger.info("uploading artifacts")
|
||||||
|
|
||||||
ssh_cmd = (
|
os.chdir(opt.clone_dir)
|
||||||
r"C:\MinGW\msys\1.0\bin\ssh -i %s "
|
|
||||||
"-o UserKnownHostsFile=%s -o StrictHostKeyChecking=yes"
|
|
||||||
% (opt.clone_dir / "id_rsa", opt.clone_dir / 'known_hosts')
|
|
||||||
)
|
|
||||||
|
|
||||||
os.chdir(opt.package_dir)
|
|
||||||
run_command(
|
run_command(
|
||||||
[r"C:\MinGW\msys\1.0\bin\rsync", "-avr"]
|
[r"C:\MinGW\msys\1.0\bin\rsync", "-avr"]
|
||||||
+ ["-e", ssh_cmd, "dist/", "psycopg@upload.psycopg.org:"]
|
+ ["-e", r"C:\MinGW\msys\1.0\bin\ssh -F data/ssh_config"]
|
||||||
|
+ ["psycopg2/dist/", "upload:"]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user