2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-12 00:06:36 +00:00
Commit Graph

1432 Commits

Author SHA1 Message Date
Revant Nandgaonkar
a4ef44ae27
Merge pull request #950 from Thunderbottom/redis-procfile-docker
feat(procfile): dont add redis to procfile if skipping config gen
2020-03-11 18:05:46 +05:30
gavin
0e5f36dbf7
Merge pull request #953 from gavindsouza/bench-init-error
chore: print error message in case of failures
2020-03-11 13:45:06 +05:30
Gavin D'souza
06d4303a9f chore: print error message in case of failures 2020-03-11 12:30:37 +05:30
gavin
1f5c7ec201
chore: add travis, deepsource (#900)
* chore: added deepsource config

* chore: updated travis config

* chore: updated travis config

* chore: updated travis tests for 2.7, 3.6, 3.7, 3.8

* chore: quiet installs and sudo easy install

* fix(tests): add mariadb versioning

* fix(travis): print compat for pyhton 3

* fix: drop deprecated function usage

* chore(tests): update test_init

* tests: update branch to use version-12 for testing and use git module

* chore: quieten git command outputs on branch switch

* fix: execute 'setup production' via cli

* style: sort imports

* chore: update mariadb variables in .travis.yml

* chore: seperate jobs for easy install and production setup

* chore: use exec_cmd to log command output

* chore: pin tests to ubuntu trusty

* chore: use playbooks to install mariadb

* chore: mariadb fixes in travis

* chore: pin dist to ubuntu 18.04

* chore: setup envs according by type of test

* chore: ignore auto backup, procfile, assets build

* chore: change app frammeclient to frappe_theme

* test: try travis_wait

* tests: update and restructure tests

* tests: restructure flow of setUp, tearDown

* fix: python class inheritence fix

* chore: use local frappe repo instead of remote pull

* tests: skip assets during get-app

* fix(tests): remove reinstalling app after get_app called

* fix(tests): updated test_install_app

* fix: broken remove_app
tests: broken tests

* tests: no backup while dropping new_sites

* tests: added certain tests and py obj fixes

* tests: seperate basic and production setup tests

* tests: update travis, remove basic setup

* chore: move from function calls to exec_cmd

* chore: tests fixes

* chore: removed sudo from basic setup runs

* chore: use "sudo" for setting up sudoers

* fix: allow get_app from local folder

* fix: use gitpython to switch branch instead of exec_cmd

* chore: use test to check for file existing

* chore: restructure bench tests

* fix: fetch app repo before checking for version upgrade during
switch_branch

* fix: gitpython error in usage

* fix: boolean return value of file_exists

* fix: dont decode file contents

* fix: bench names and close open files

* chore: update bench config multiple benches

* chore: check where production fails

* chore: mention python version for init

* chore: remove node production test in CI

* fix: compatibility and permissions fixes

* chore: setup sudoers after prod setup

* fix: set remote upstream after local clone

* fix: disable production via cli

* chore(tests): fix upstream link

* chore: split tests and remove unused imports
2020-03-09 17:47:43 +05:30
gavin
cbd5936742
Merge pull request #951 from gavindsouza/bench-switch-branch
fix: switch branches "better"
2020-03-09 13:58:32 +05:30
Gavin D'souza
dc307b6880 fix: switch branches "better" 2020-03-09 13:53:13 +05:30
Chinmay D. Pai
fceb2725c4
chore: rename setup_redis to skip_redis
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-03-05 22:59:59 +05:30
Chinmay D. Pai
4c173ded26
feat(procfile): dont add redis to procfile if skipping config gen
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-03-05 18:26:48 +05:30
Suraj Shetty
189d0c7d38
Merge pull request #948 from gavindsouza/update-requirements-fix
fix: setup requirements --python skips assets
2020-03-04 14:52:22 +05:30
Gavin D'souza
d0ebf7f4c4 fix: setup requirements --python skips assets 2020-03-04 14:04:54 +05:30
gavin
34107e0f12
Merge pull request #947 from gavindsouza/switch-to-branch-fix
fix: remove deprecated pre_upgrade usage
2020-03-04 13:15:33 +05:30
Gavin D'souza
016b7da9ff fix: remove deprecated pre_upgrade usage 2020-03-04 13:12:39 +05:30
Chris Ian Fiel
76943e070c
fix: "Error: no such option: --backup" (#946)
* fix issue: Error: no such option: --backup
https://discuss.erpnext.com/t/bench-update-fails-due-to-no-bench-backup-option/58697
2020-03-04 08:44:45 +05:30
gavin
6ecfa006e2
Merge pull request #925 from gavindsouza/bench-cmd-help
refactor: bench commands help
2020-03-02 23:17:46 +05:30
Gavin D'souza
0088d1565d style: fixed cmd log formatting via exec_cmd 2020-03-02 23:00:15 +05:30
gavin
b0649870ee
fix: random failings from subprocesses and command formatting (#935)
* fix: random failings from subprocesses

    async executions of muliple processes leads to various errors.
    eg: get-app operation runs a "git clone" at the same time "pip
    install" is run. This causes failures as the folder either doesnt
    exist or isnt complete.

    Proposed solution to this is to execute blocking subprocesseses

* style: command logging format via exec_cmd
2020-03-02 19:32:25 +05:30
Gavin D'souza
9b5e1c9fdc style: removed unused imports 2020-03-02 19:24:41 +05:30
gavin
b672466dad
Merge branch 'master' into bench-cmd-help 2020-03-02 19:06:04 +05:30
gavin
ec1343c0fa
fix: dont abort script if not overwriting scripts (#919)
* fix: dont abort script if not overwriting scripts

why: currently, running of `bench ` or `bench setup
production` creates nginx conf files and asks for confirmation before
overwriting them. in case user doesnt want to overwrite files,
`setup production` and `lets-encrypt` is exitted abrubtly and nginx isnt started again after

* fix: use click.confirm instead of six.moves.input

* fix: use click.confirm instead of six.moves.input

* chore: remove unused imports
2020-02-28 15:33:00 +05:30
gavin
ddcd2c11a1
chore: update GitPython (#938)
* Revert "chore: pin gitdb2 only for python < 3.4"

* chore: update GitPython and remove second level dependencies
2020-02-28 14:42:14 +05:30
gavin
495a038c45
fix(easy-install): compatibility for easy install on PY2 (#937)
* fix: compatibility for easy install on PY2

* test: remove python-distutils from travis

* chore: handle specific CalledProcessError for setuptools

Co-authored-by: Chinmay Pai <chinmaydpai@gmail.com>
2020-02-27 21:19:20 +05:30
gavin
d701fe86a7
Merge pull request #929 from Thunderbottom/fix-easy_install
chore: fix easy_install
2020-02-27 16:10:18 +05:30
gavin
aef35c6957
Merge pull request #876 from Thunderbottom/get-app-overwrite
fix(get-app): handle existing directory and other formatting changes
2020-02-27 11:10:52 +05:30
Chinmay D. Pai
3bd83da49b
chore: remove redundant print messages
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-02-26 20:00:52 +05:30
gavin
2d98d35f1b
Merge pull request #926 from gavindsouza/bench-docs-help
docs: added bench usage docs
2020-02-25 12:53:28 +05:30
gavin
f5d3a53cee
Merge pull request #933 from Thunderbottom/pin-req
chore: pin gitdb2 only for python < 3.4
2020-02-25 12:35:00 +05:30
Chinmay D. Pai
e5b84be566
chore: pin gitdb2 only for python < 3.4
pip allows pinning requirement using environment markers[0]

[0]: https://www.python.org/dev/peps/pep-0508/#environment-markers

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-02-25 12:11:24 +05:30
gavin
354d23e787
Merge pull request #932 from gavindsouza/pin-dependencies
fix: pin dependencies of requirements
2020-02-25 12:03:55 +05:30
Chinmay D. Pai
206d5ed3ae
chore: solve merge conflicts
* renme build_asset_files tp skip_asset
* add overwrite flag
* move building assets to postprocessing

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-02-25 11:58:49 +05:30
Gavin D'souza
c660593a9a fix: pin dependencies of requirements 2020-02-25 11:57:28 +05:30
Chinmay D. Pai
0c0ed767f7
chore: add overwrite flag, repo_name format, and exit gracefully
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-02-25 11:45:03 +05:30
Gavin D'souza
5af3716560 docs: updated and re-link docs 2020-02-24 12:51:53 +05:30
gavin
92d2fbdc13
fix: setup cron job for renewing ssl certificate (#918)
* fix: setup cronjob for renewing ssl certificate

cronjob set for 1st of every month

* fix: cannonical PYPI package name updates

    refs:
    - https://pypi.org/project/python-crontab/
    - https://github.com/frappe/bench/pull/918#issuecomment-589961301
2020-02-24 12:09:24 +05:30
Chinmay D. Pai
bf47661f3e
chore: setup distutils using apt instead of pip
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-02-20 20:34:43 +05:30
Chinmay D. Pai
0a9effdfb4
chore: setup distutils inside travis
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-02-20 20:12:28 +05:30
Chinmay D. Pai
986015c13c
chore: substitute shutil.which with find_executable on py2
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-02-20 20:02:35 +05:30
Chinmay D. Pai
0b3feb1f7b
chore: add check for CI
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-02-20 19:55:50 +05:30
Chinmay D. Pai
d47e1ac330
chore: fix easy_install
import print from __future__ for python2 to use print's file param

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-02-20 19:46:40 +05:30
Gavin D'souza
9107581a56 docs: added bench usage docs 2020-02-19 15:33:10 +05:30
Gavin D'souza
8fd534747a docs: added missing help for install prerequisites 2020-02-19 11:39:07 +05:30
Gavin D'souza
f9521efc50 chore: removed unused and optimized imports 2020-02-18 19:33:44 +05:30
Gavin D'souza
b4f4e71719 chore: move 'find_parent_bench' to utils
style: consistent spaces and formatting, code cleanup
2020-02-18 19:15:52 +05:30
Gavin D'souza
90d2313947 chore: drop bench shell command 2020-02-18 18:50:28 +05:30
Gavin D'souza
043f044853 style: bench.commands.utils help added 2020-02-18 18:47:38 +05:30
Gavin D'souza
9d00bc743e style: help moved in bench.commands.utils docs 2020-02-18 18:04:20 +05:30
Gavin D'souza
2713a2e9cd fix: move update to utils
- update.py
    * chore: drop auto_update options
    * fix: reloading bench modules post requirements setup (seemed
    unecessary and randomly crashed `bench start` process)
    * docs: added help for commands
    * chore: deprecated switch-to-master function

  - utils.py
    * sorted imports for readability
    * formatting and consistency
    * dropped unused setup_auto_update
    * dropped broken pre_upgrade function

Signed-off-by: Gavin D'souza <gavin18d@gmail.com>
2020-02-18 17:19:42 +05:30
Gavin D'souza
f1ea6fce3f chore: drop auto update bench via cronjob 2020-02-18 17:07:26 +05:30
Gavin D'souza
063e4a85be refactor: bench.command.install
* sorted imports
    * consistent formatting and use of docstrings
    * help added for click commands
2020-02-18 12:24:18 +05:30
Gavin D'souza
9621686597 refactor: consistent help action in click, formatting and sorted imports 2020-02-18 11:57:23 +05:30
Gavin D'souza
53e2272a66 refactor: bench.commands.config
* sorted imports
    * made it a little DRY
    * code formatting
    * added help
2020-02-18 11:50:53 +05:30