mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-18 10:15:04 +01:00
Remove extraneous fluff from the dist directory
This commit is contained in:
parent
ed1caccac7
commit
c203b2fcd4
1 changed files with 8 additions and 4 deletions
|
|
@ -508,9 +508,13 @@ def build_portable(self):
|
|||
|
||||
def sign_installers(self):
|
||||
self.info('Signing installers...')
|
||||
files = glob.glob(self.j('dist', '*.msi')) + glob.glob(self.j('dist',
|
||||
'*.exe'))
|
||||
if not files:
|
||||
installers = set()
|
||||
for f in glob.glob(self.j('dist', '*')):
|
||||
if f.rpartition('.')[-1].lower() in {'exe', 'msi'}:
|
||||
installers.add(f)
|
||||
else:
|
||||
os.remove(f)
|
||||
if not installers:
|
||||
raise ValueError('No installers found')
|
||||
args = ['signtool.exe', 'sign', '/a', '/fd', 'sha256', '/td', 'sha256', '/d',
|
||||
'calibre - E-book management', '/du',
|
||||
|
|
@ -519,7 +523,7 @@ def sign_installers(self):
|
|||
def runcmd(cmd):
|
||||
for timeserver in ('http://sha256timestamp.ws.symantec.com/sha256/timestamp', 'http://timestamp.comodoca.com/rfc3161',):
|
||||
try:
|
||||
subprocess.check_call(cmd + [timeserver] + files)
|
||||
subprocess.check_call(cmd + [timeserver] + list(installers))
|
||||
break
|
||||
except subprocess.CalledProcessError:
|
||||
print ('Signing failed, retrying with different timestamp server')
|
||||
|
|
|
|||
Loading…
Reference in a new issue