Skip to content

Commit

Permalink
DRYer
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Dec 26, 2014
1 parent e723ec4 commit ea2816d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions setup/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

import os, shutil, subprocess, glob, tempfile, json, time, filecmp, atexit, sys

from setup import Command, __version__, require_clean_git, require_git_master, installer_name
from setup import Command, __version__, require_clean_git, require_git_master
from setup.upload import installers
from setup.parallel_build import parallel_build

class Stage1(Command):
Expand Down Expand Up @@ -98,8 +99,7 @@ def workers_running():
for p in sorted(processes, key=lambda p:p.duration):
self.info('Built %s in %d minutes and %d seconds' % (p.bname, p.duration // 60, p.duration % 60))

for ext, is64bit in {'msi': True, 'msi':False, 'exe':False, 'dmg':True, 'txz':True, 'txz':False}.iteritems():
installer = installer_name(ext, is64bit)
for installer in installers(include_source=False):
if not os.path.exists(self.j(self.d(self.SRC), installer)):
raise SystemExit('The installer %s does not exist' % os.path.basename(installer))

Expand Down
5 changes: 3 additions & 2 deletions setup/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@
STAGING_USER = 'root'
STAGING_DIR = '/root/staging'

def installers():
def installers(include_source=True):
installers = list(map(installer_name, ('dmg', 'msi', 'txz')))
installers.append(installer_name('txz', is64bit=True))
installers.append(installer_name('msi', is64bit=True))
installers.insert(0, 'dist/%s-%s.tar.xz'%(__appname__, __version__))
if include_source:
installers.insert(0, 'dist/%s-%s.tar.xz'%(__appname__, __version__))
installers.append('dist/%s-portable-installer-%s.exe'%(__appname__, __version__))
return installers

Expand Down

0 comments on commit ea2816d

Please sign in to comment.