Skip to content

Commit

Permalink
Merge branch 'develop' into declarative-setup-bench
Browse files Browse the repository at this point in the history
  • Loading branch information
gavindsouza authored Jul 6, 2020
2 parents 42cd38b + 6401d9b commit 6c4bb28
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bench/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def cli():
change_dir()
change_uid()

if is_dist_editable(bench.PROJECT_NAME) and len(sys.argv) > 1 and sys.argv[1] != "src":
if is_dist_editable(bench.PROJECT_NAME) and len(sys.argv) > 1 and sys.argv[1] != "src" and not get_config(".").get("developer_mode"):
log("bench is installed in editable mode!\n\nThis is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`\n", level=3)

if not is_bench_directory() and not cmd_requires_root() and len(sys.argv) > 1 and sys.argv[1] not in ("init", "find", "src"):
Expand Down
6 changes: 6 additions & 0 deletions bench/playbooks/roles/wkhtmltopdf/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
force: yes
when: ansible_os_family == 'Debian'

- name: download wkthmltox Ubuntu 20
get_url:
url: https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.focal_amd64.deb
dest: /tmp/wkhtmltox.deb
when: ansible_distribution == 'Ubuntu' and ansible_distribution_major_version == '20'

- name: download wkthmltox Ubuntu 18
get_url:
url: https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_{{ "amd64" if ansible_architecture == "x86_64" else "i386"}}.deb
Expand Down
7 changes: 7 additions & 0 deletions bench/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,16 @@ def log(message, level=0):
2: color.red + 'ERROR', # fail
3: color.yellow + 'WARN' # warn/suggest
}
loggers = {
2: logger.error,
3: logger.warning
}

start_line = (levels.get(level) + ': ') if level in levels else ''
level_logger = loggers.get(level, logger.info)
end_line = '\033[0m'

level_logger(message)
print(start_line + message + end_line)


Expand Down
2 changes: 1 addition & 1 deletion docs/easy_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ TLDR; Save the logs!

3. A lot of things can go wrong in setting up the environment due to prior settings, company protocols or even breaking changes in system packages and their dependencies.

4. Sharing your logfile in any issues opened related to this can help us find solutions to it faster and make the sript better!
4. Sharing your logfile in any issues opened related to this can help us find solutions to it faster and make the script better!

0 comments on commit 6c4bb28

Please sign in to comment.