mirror of
https://github.com/frappe/bench.git
synced 2024-11-11 15:51:03 +00:00
Merge pull request #638 from codingCoffee/frappe_erp
set repo-url and branch for frappe and erpnext
This commit is contained in:
commit
8cb621cfdd
@ -103,8 +103,17 @@ def install_bench(args):
|
||||
if args.production:
|
||||
extra_vars.update(max_worker_connections=multiprocessing.cpu_count() * 1024)
|
||||
|
||||
branch = 'master' if args.production else 'develop'
|
||||
extra_vars.update(branch=branch)
|
||||
if args.frappe_branch:
|
||||
frappe_branch = args.frappe_branch
|
||||
else:
|
||||
frappe_branch = 'master' if args.production else 'develop'
|
||||
extra_vars.update(frappe_branch=frappe_branch)
|
||||
|
||||
if args.erpnext_branch:
|
||||
erpnext_branch = args.erpnext_branch
|
||||
else:
|
||||
erpnext_branch = 'master' if args.production else 'develop'
|
||||
extra_vars.update(erpnext_branch=erpnext_branch)
|
||||
|
||||
bench_name = 'frappe-bench' if not args.bench_name else args.bench_name
|
||||
extra_vars.update(bench_name=bench_name)
|
||||
@ -359,6 +368,18 @@ def parse_commandline_args():
|
||||
|
||||
parser.add_argument('--repo-url', dest='repo_url', help='Clone bench from the given url')
|
||||
|
||||
parser.add_argument('--frappe-repo-url', dest='frappe_repo_url', action='store', default='https://github.com/frappe/frappe',
|
||||
help='Clone frappe from the given url')
|
||||
|
||||
parser.add_argument('--frappe-branch', dest='frappe_branch', action='store',
|
||||
help='Clone a particular branch of frappe')
|
||||
|
||||
parser.add_argument('--erpnext-repo-url', dest='erpnext_repo_url', action='store', default='https://github.com/frappe/erpnext',
|
||||
help='Clone erpnext from the given url')
|
||||
|
||||
parser.add_argument('--erpnext-branch', dest='erpnext_branch', action='store',
|
||||
help='Clone a particular branch of erpnext')
|
||||
|
||||
# To enable testing of script using Travis, this should skip the prompt
|
||||
parser.add_argument('--run-travis', dest='run_travis', action='store_true', default=False,
|
||||
help=argparse.SUPPRESS)
|
||||
|
@ -29,13 +29,13 @@
|
||||
register: bench_stat
|
||||
|
||||
- name: python3 bench init for develop
|
||||
command: bench init {{ bench_path }} --frappe-branch {{ branch }} --python {{ python }}
|
||||
command: bench init {{ bench_path }} --frappe-path {{ frappe_repo_url }} --frappe-branch {{ frappe_branch }} --python {{ python }}
|
||||
args:
|
||||
creates: "{{ bench_path }}"
|
||||
when: not bench_stat.stat.exists and not production
|
||||
|
||||
- name: python2 bench init for production
|
||||
command: bench init {{ bench_path }} --frappe-branch {{ branch }}
|
||||
command: bench init {{ bench_path }} --frappe-path {{ frappe_repo_url }} --frappe-branch {{ frappe_branch }}
|
||||
args:
|
||||
creates: "{{ bench_path }}"
|
||||
when: not bench_stat.stat.exists and production
|
||||
|
@ -4,7 +4,7 @@
|
||||
register: app
|
||||
|
||||
- name: Get the ERPNext app
|
||||
command: bench get-app erpnext https://github.com/frappe/erpnext --branch {{ branch }}
|
||||
command: bench get-app erpnext {{ erpnext_repo_url }} --branch {{ erpnext_branch }}
|
||||
args:
|
||||
creates: "{{ bench_path }}/apps/erpnext"
|
||||
chdir: "{{ bench_path }}"
|
||||
|
Loading…
Reference in New Issue
Block a user