Update publish_betas command

This commit is contained in:
Kovid Goyal 2017-05-07 17:52:08 +05:30
parent a7e7b0d381
commit c7d4af9ab7
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 4 additions and 4 deletions

View File

@ -63,10 +63,9 @@ def build_cache_dir():
return ans
def require_git_master():
if subprocess.check_output(['git', 'symbolic-ref', '--short', 'HEAD']).strip() != 'master':
print >>sys.stderr, 'You must be in the master git branch'
raise SystemExit(1)
def require_git_master(branch='master'):
if subprocess.check_output(['git', 'symbolic-ref', '--short', 'HEAD']).strip() != branch:
raise SystemExit('You must be in the {} got branch'.format(branch))
def require_clean_git():

View File

@ -157,6 +157,7 @@ class PublishBetas(Command):
def pre_sub_commands(self, opts):
require_clean_git()
require_git_master('vs2015')
def run(self, opts):
dist = self.a(self.j(self.d(self.SRC), 'dist'))