From 98c1949120b63259825487e4d53023236a367a15 Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Fri, 5 Sep 2014 14:53:21 +0530 Subject: [PATCH] require configuration for release --- bench/cli.py | 3 +++ bench/release.py | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/bench/cli.py b/bench/cli.py index 112147b4..c8b09871 100644 --- a/bench/cli.py +++ b/bench/cli.py @@ -102,6 +102,9 @@ def update(pull=False, patch=False, build=False, bench=False, auto=False, restar pull, patch, build, bench, requirements = True, True, True, True, True conf = get_config() + if conf.get('release_bench'): + print 'Release bench, cannot update' + sys.exit(1) if auto and not conf.get('auto_update'): sys.exit(1) if bench and conf.get('update_bench_on_update'): diff --git a/bench/release.py b/bench/release.py index 73e03214..f0b209be 100644 --- a/bench/release.py +++ b/bench/release.py @@ -1,6 +1,7 @@ #! env python import json import os +import sys import semantic_version import git import json @@ -11,6 +12,7 @@ import re from requests.auth import HTTPBasicAuth import requests.exceptions from time import sleep +from .utils import get_config github_username = None github_password = None @@ -154,6 +156,9 @@ def bump(repo, bump_type): print 'Released {tag} for {repo}'.format(tag=tag_name, repo=repo) def release(repo, bump_type): + if not get_config().get('release_bench'): + print 'bench not configured to release' + sys.exit(1) global github_username, github_password github_username = raw_input('username:') github_password = getpass.getpass()