Dont keep a local backup of the calibre installers

This commit is contained in:
Kovid Goyal 2020-06-05 08:20:43 +05:30
parent 65ad7eabd3
commit 8de4c3268e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -234,11 +234,8 @@ class UploadInstallers(Command): # {{{
sizes = {os.path.basename(x): os.path.getsize(x) for x in files}
self.record_sizes(sizes)
tdir = mkdtemp()
backup = os.path.join('/mnt/external/calibre/%s' % __version__)
if not os.path.exists(backup):
os.mkdir(backup)
try:
self.upload_to_staging(tdir, backup, files)
self.upload_to_staging(tdir, files)
self.upload_to_calibre()
if opts.replace:
upload_signatures()
@ -257,7 +254,7 @@ class UploadInstallers(Command): # {{{
]
check_call(['ssh', 'code', '/usr/local/bin/dist_sizes'] + args)
def upload_to_staging(self, tdir, backup, files):
def upload_to_staging(self, tdir, files):
os.mkdir(tdir + '/dist')
hosting = os.path.join(
os.path.dirname(os.path.abspath(__file__)), 'hosting.py'
@ -265,7 +262,7 @@ class UploadInstallers(Command): # {{{
shutil.copyfile(hosting, os.path.join(tdir, 'hosting.py'))
for f in files:
for x in (tdir + '/dist', backup):
for x in (tdir + '/dist',):
dest = os.path.join(x, os.path.basename(f))
shutil.copy2(f, x)
os.chmod(