Command to easily publish betas

This commit is contained in:
Kovid Goyal 2014-08-01 11:02:11 +05:30
parent a66654d31a
commit 6cc9894846
2 changed files with 19 additions and 2 deletions

View File

@ -21,7 +21,7 @@ __all__ = [
'linux32', 'linux64', 'linux', 'linux_freeze',
'osx32_freeze', 'osx', 'rsync', 'push',
'win32_freeze', 'win32', 'win64', 'win',
'stage1', 'stage2', 'stage3', 'stage4', 'stage5', 'publish'
'stage1', 'stage2', 'stage3', 'stage4', 'stage5', 'publish', 'publish_betas',
]
@ -58,7 +58,7 @@ kakasi = Kakasi()
coffee = Coffee()
from setup.publish import Manual, TagRelease, Stage1, Stage2, \
Stage3, Stage4, Stage5, Publish
Stage3, Stage4, Stage5, Publish, PublishBetas
manual = Manual()
tag_release = TagRelease()
stage1 = Stage1()
@ -67,6 +67,7 @@ stage3 = Stage3()
stage4 = Stage4()
stage5 = Stage5()
publish = Publish()
publish_betas = PublishBetas()
from setup.upload import (UploadUserManual, UploadDemo, UploadInstallers,
UploadToServer, ReUpload)

View File

@ -65,6 +65,22 @@ class Publish(Command):
require_git_master()
require_clean_git()
class PublishBetas(Command):
sub_commands = ['sdist', 'stage2',]
def pre_sub_commands(self, opts):
require_clean_git()
dist = self.a(self.j(self.d(self.SRC), 'dist'))
if os.path.exists(dist):
shutil.rmtree(dist)
os.mkdir(dist)
def run(self, opts):
dist = self.a(self.j(self.d(self.SRC), 'dist'))
subprocess.check_call(
('rsync --partial -rh --progress --delete %s/ download.calibre-ebook.com:/srv/download/betas/' % dist).split())
class Manual(Command):
description='''Build the User Manual '''