mirror of
https://github.com/frappe/bench.git
synced 2025-01-10 00:37:51 +00:00
[minor] save github username, pass
This commit is contained in:
parent
452c12df89
commit
daabbd8c1e
@ -27,13 +27,21 @@ def release(bench_path, app, bump_type, develop='develop', master='master',
|
||||
repo_name=repo_name, remote=remote)
|
||||
|
||||
def validate(bench_path):
|
||||
if not get_config(bench_path).get('release_bench'):
|
||||
config = get_config(bench_path)
|
||||
if not 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()
|
||||
|
||||
github_username = config.get('github_username')
|
||||
github_password = config.get('github_password')
|
||||
|
||||
if not github_username:
|
||||
github_username = raw_input('Username: ')
|
||||
|
||||
if not github_password:
|
||||
github_password = getpass.getpass()
|
||||
|
||||
r = requests.get('https://api.github.com/user', auth=HTTPBasicAuth(github_username, github_password))
|
||||
r.raise_for_status()
|
||||
|
Loading…
Reference in New Issue
Block a user