mirror of
https://github.com/frappe/bench.git
synced 2024-11-12 00:06:36 +00:00
removed repo_map and changed owner to option from argument
This commit is contained in:
parent
95eae6d3b4
commit
4a60de9268
@ -118,12 +118,11 @@ def backup_all_sites():
|
|||||||
@click.command('release')
|
@click.command('release')
|
||||||
@click.argument('app')
|
@click.argument('app')
|
||||||
@click.argument('bump-type', type=click.Choice(['major', 'minor', 'patch']))
|
@click.argument('bump-type', type=click.Choice(['major', 'minor', 'patch']))
|
||||||
@click.argument('owner', default='frappe')
|
|
||||||
@click.option('--develop', default='develop')
|
@click.option('--develop', default='develop')
|
||||||
@click.option('--master', default='master')
|
@click.option('--master', default='master')
|
||||||
|
@click.option('--owner', default='frappe')
|
||||||
def release(app, bump_type, develop, master, owner):
|
def release(app, bump_type, develop, master, owner):
|
||||||
"Release app (internal to the Frappe team)"
|
"Release app (internal to the Frappe team)"
|
||||||
from bench.release import release
|
from bench.release import release
|
||||||
repo = os.path.join('apps', app)
|
repo = os.path.join('apps', app)
|
||||||
release(repo, bump_type, develop, master, owner)
|
release(repo, bump_type, develop, master, owner)
|
||||||
|
|
||||||
|
@ -19,14 +19,6 @@ import click
|
|||||||
github_username = None
|
github_username = None
|
||||||
github_password = None
|
github_password = None
|
||||||
|
|
||||||
repo_map = {
|
|
||||||
'frappe': 'frappe',
|
|
||||||
'erpnext': 'erpnext',
|
|
||||||
'erpnext_shopify': 'erpnext_shopify',
|
|
||||||
'paypal_integration': 'paypal_integration',
|
|
||||||
'schools': 'schools'
|
|
||||||
}
|
|
||||||
|
|
||||||
def release(repo, bump_type, develop, master, owner):
|
def release(repo, bump_type, develop, master, owner):
|
||||||
if not get_config(".").get('release_bench'):
|
if not get_config(".").get('release_bench'):
|
||||||
print 'bench not configured to release'
|
print 'bench not configured to release'
|
||||||
@ -207,7 +199,7 @@ def create_github_release(owner, repo, tag_name, log, gh_username=None, gh_passw
|
|||||||
raise Exception, "No credentials"
|
raise Exception, "No credentials"
|
||||||
gh_username = github_username
|
gh_username = github_username
|
||||||
gh_password = github_password
|
gh_password = github_password
|
||||||
repo = repo_map[os.path.basename(repo)]
|
repo = os.path.basename(repo)
|
||||||
data = {
|
data = {
|
||||||
'tag_name': tag_name,
|
'tag_name': tag_name,
|
||||||
'target_commitish': 'master',
|
'target_commitish': 'master',
|
||||||
|
Loading…
Reference in New Issue
Block a user