diff --git a/setup/commands.py b/setup/commands.py index 8cc1b1b6eb..64b06a5d42 100644 --- a/setup/commands.py +++ b/setup/commands.py @@ -18,7 +18,7 @@ __all__ = [ 'upload_to_server', 'upload_installers', 'upload_user_manual', 'upload_demo', 'reupload', - 'stage1', 'stage2', 'stage3', 'stage4', 'stage5', 'publish', 'publish_betas', + 'stage1', 'stage2', 'stage3', 'stage4', 'stage5', 'publish', 'publish_betas', 'publish_preview', 'linux', 'linux64', 'linuxarm64', 'win', 'win64', 'osx', 'build_dep', 'export_packages', 'hyphenation', 'liberation_fonts', 'stylelint', 'xwin', ] @@ -81,7 +81,7 @@ recent_uas = RecentUAs() rapydscript = RapydScript() from setup.publish import Manual, TagRelease, Stage1, Stage2, \ - Stage3, Stage4, Stage5, Publish, PublishBetas, ManPages + Stage3, Stage4, Stage5, Publish, PublishBetas, PublishPreview, ManPages manual = Manual() tag_release = TagRelease() stage1 = Stage1() @@ -91,6 +91,7 @@ stage4 = Stage4() stage5 = Stage5() publish = Publish() publish_betas = PublishBetas() +publish_preview = PublishPreview() man_pages = ManPages() from setup.upload import (UploadUserManual, UploadDemo, UploadInstallers, diff --git a/setup/publish.py b/setup/publish.py index f4059e3551..280642fa6d 100644 --- a/setup/publish.py +++ b/setup/publish.py @@ -126,6 +126,30 @@ class PublishBetas(Command): ).split()) +class PublishPreview(Command): + + sub_commands = ['stage1', 'stage2', 'sdist'] + + def pre_sub_commands(self, opts): + version = tuple(map(int, __version__.split('.'))) + if version[2] < 100: + raise SystemExit('Must set calibre version to have patch level greater than 100') + require_clean_git() + require_git_master() + + def run(self, opts): + dist = self.a(self.j(self.d(self.SRC), 'dist')) + with open(os.path.join(dist, 'README.txt'), 'w') as f: + print('''\ +These are preview releases of changes to calibre since the last normal release. +Preview releases are typically released every Friday, they serve as a way +for users to test upcoming features/fixes in the next calibre release. +''', file=f) + subprocess.check_call(( + f'rsync -rh --info=progress2 --delete-after --delete {dist}/ download.calibre-ebook.com:/srv/download/preview/' + ).split()) + + class Manual(Command): description = '''Build the User Manual ''' diff --git a/src/calibre/constants.py b/src/calibre/constants.py index 115ddacfa1..56f1a876fd 100644 --- a/src/calibre/constants.py +++ b/src/calibre/constants.py @@ -5,7 +5,7 @@ from functools import lru_cache import sys, locale, codecs, os, collections, collections.abc __appname__ = 'calibre' -numeric_version = (7, 6, 0) +numeric_version = (7, 6, 100) __version__ = '.'.join(map(str, numeric_version)) git_version = None __author__ = "Kovid Goyal "