mirror of
https://github.com/frappe/bench.git
synced 2024-11-13 16:56:33 +00:00
confirm for checking manually before release
This commit is contained in:
parent
aa3b08047c
commit
67269c26a4
@ -24,6 +24,7 @@ github_password = None
|
||||
def release(bench_path, app, bump_type, from_branch='develop', to_branch='master',
|
||||
remote='upstream', owner='frappe', repo_name=None):
|
||||
|
||||
confirm_testing()
|
||||
config = get_config(bench_path)
|
||||
|
||||
if not config.get('release_bench'):
|
||||
@ -53,6 +54,15 @@ def validate(bench_path, config):
|
||||
r = requests.get('https://api.github.com/user', auth=HTTPBasicAuth(github_username, github_password))
|
||||
r.raise_for_status()
|
||||
|
||||
def confirm_testing():
|
||||
print('')
|
||||
print('================ CAUTION ==================')
|
||||
print('Never miss this, even if it is a really small release!!')
|
||||
print('Manual Testing Checklisk: https://github.com/frappe/bench/wiki/Testing-Checklist')
|
||||
print('')
|
||||
print('')
|
||||
click.confirm('Is manual testing done?', abort = True)
|
||||
|
||||
def bump(bench_path, app, bump_type, from_branch, to_branch, remote, owner, repo_name=None):
|
||||
assert bump_type in ['minor', 'major', 'patch', 'stable', 'prerelease']
|
||||
|
||||
@ -306,18 +316,18 @@ def push_branch_for_old_major_version(bench_path, bump_type, app, repo_path, fro
|
||||
|
||||
current_version = get_current_version(repo_path)
|
||||
old_major_version_branch = "v{major}.x.x".format(major=current_version.split('.')[0])
|
||||
|
||||
|
||||
click.confirm('Do you want to push {branch}?'.format(branch=old_major_version_branch), abort=True)
|
||||
|
||||
|
||||
update_branch(repo_path, to_branch, remote=remote)
|
||||
|
||||
|
||||
g = git.Repo(repo_path).git
|
||||
g.checkout(b=old_major_version_branch)
|
||||
|
||||
|
||||
args = [
|
||||
'{old_major_version_branch}:{old_major_version_branch}'.format(old_major_version_branch=old_major_version_branch),
|
||||
]
|
||||
|
||||
|
||||
print("Pushing {old_major_version_branch} ".format(old_major_version_branch=old_major_version_branch))
|
||||
print(g.push(remote, *args))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user