mirror of
https://github.com/frappe/bench.git
synced 2025-02-03 19:38:24 +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:
|
if args.production:
|
||||||
extra_vars.update(max_worker_connections=multiprocessing.cpu_count() * 1024)
|
extra_vars.update(max_worker_connections=multiprocessing.cpu_count() * 1024)
|
||||||
|
|
||||||
branch = 'master' if args.production else 'develop'
|
if args.frappe_branch:
|
||||||
extra_vars.update(branch=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
|
bench_name = 'frappe-bench' if not args.bench_name else args.bench_name
|
||||||
extra_vars.update(bench_name=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('--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
|
# 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,
|
parser.add_argument('--run-travis', dest='run_travis', action='store_true', default=False,
|
||||||
help=argparse.SUPPRESS)
|
help=argparse.SUPPRESS)
|
||||||
|
@ -29,13 +29,13 @@
|
|||||||
register: bench_stat
|
register: bench_stat
|
||||||
|
|
||||||
- name: python3 bench init for develop
|
- 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:
|
args:
|
||||||
creates: "{{ bench_path }}"
|
creates: "{{ bench_path }}"
|
||||||
when: not bench_stat.stat.exists and not production
|
when: not bench_stat.stat.exists and not production
|
||||||
|
|
||||||
- name: python2 bench init for 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:
|
args:
|
||||||
creates: "{{ bench_path }}"
|
creates: "{{ bench_path }}"
|
||||||
when: not bench_stat.stat.exists and production
|
when: not bench_stat.stat.exists and production
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
register: app
|
register: app
|
||||||
|
|
||||||
- name: Get the ERPNext 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:
|
args:
|
||||||
creates: "{{ bench_path }}/apps/erpnext"
|
creates: "{{ bench_path }}/apps/erpnext"
|
||||||
chdir: "{{ bench_path }}"
|
chdir: "{{ bench_path }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user