2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-10 17:24:41 +00:00
Commit Graph

259 Commits

Author SHA1 Message Date
Gavin D'souza
dd047002a1 fix: dont run ayrn install while setting up py reqs 2020-05-19 14:14:01 +05:30
Gavin D'souza
53919b624e fix: add log filter to handler 2020-05-19 13:47:48 +05:30
Gavin D'souza
0be833ad85 fix: cleaner and intuitive bench logs 2020-05-19 13:11:57 +05:30
Gavin D'souza
34de3d03a4 chore: drop dead code 2020-05-19 13:09:08 +05:30
Gavin D'souza
9f467d88e4 fix: force checkout during switch_branch and quiet fetch 2020-05-15 11:42:31 +05:30
Gavin D'souza
4ae8ae21f7 fix: PY2 compatible regex 2020-05-14 20:12:26 +05:30
Gavin D'souza
30473d3535 feat: added specific checks for git URLs
API Added: bench.utils.is_git_url
Reference: https://github.com/jonschlinkert/is-git-url
2020-05-14 17:45:28 +05:30
Gavin D'souza
74028074df fix(get-app): allow ssh urls 2020-05-12 11:00:15 +05:30
Gavin D'souza
67fb0a4042 fix: install node modules if package.json exists 2020-05-06 11:54:34 +05:30
Gavin D'souza
b3842d9b30 fix: handle app not found under GH frappe erpnext orgs 2020-05-04 17:44:46 +05:30
Gavin D'souza
03e512fdab fix: get-app sets up node requirements 2020-05-04 17:43:32 +05:30
Chinmay D. Pai
7f4b19cb7f
Merge branch 'master' of github.com:frappe/bench into pull_specific_apps
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-04-19 13:23:36 +05:30
Gavin D'souza
8fb831d870 style: clearer import paths 2020-03-11 12:12:24 +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 D'souza
dc307b6880 fix: switch branches "better" 2020-03-09 13:53:13 +05:30
Gavin D'souza
016b7da9ff fix: remove deprecated pre_upgrade usage 2020-03-04 13:12:39 +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
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
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
Chinmay D. Pai
be36a1411c
feat(bench update): allow pull-only update on specified apps
* renamed method pull_all_apps to pull_apps
* allow specifying a list of applications to be updated with:

	bench update --pull --apps frappe,erpnext

* if no applications are specified, all apps present inside apps.txt
  will be pulled

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-02-10 15:01:12 +05:30
Gavin D'souza
03c4d9610a chore: fixed validate branch on update 2020-01-21 14:27:00 +05:30
gavin
f60466caaf
Merge pull request #899 from gavindsouza/bench-cleanup
feat: rollback on bench init
2020-01-20 10:46:09 +05:30
Gavin D'souza
b85651653b fix: validate branch error message + cleanup 2020-01-20 09:43:51 +05:30
ckosiegbu
5762724cc7 fix: validate branch in bench update
bench update assumes that erpnext is an installed app in the bench. This is a wrong assumption. This work around checks for the intersection of installed apps with  the list ['frappe', 'erpnext'] and only attempts to get the current branch of apps that occur in the intersection. This way, if erpnext is not installed (very likely for those using frappe only to build their own apps) there wont be an error when get_current_branch is called for erpnext. The need to perform the kind of check being performed in validate_branch is a strong case for considering apps being able to add "bench update" hooks in their hooks.py

See this topic https://discuss.erpnext.com/t/bench-update-error-no-such-file-or-directory-apps-erpnext/56932?u=chude_osiegbu
2020-01-20 09:43:39 +05:30
Gavin D'souza
1b0008d709 fix: single process to pip install requirements, quiet flag added 2020-01-15 14:24:03 +05:30
Shridhar Patil
a65e9f09dc changed parameter name 2019-12-20 17:20:28 +05:30
Chinmay D. Pai
699705f64b
fix: incorrect import statement
use six.moves instead of six

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2019-12-15 13:46:14 +05:30
Chinmay D. Pai
d1a3017172
fix(get-app): handle existing directory and other formatting changes
* if a directory for the application already exists, provide user with 2
  options:

  * ask to remove the directory and reclone (overwrite)
  * ask if the user wants to reinstall the application

* separate get_app_name from get_app

* move building assets and postprocessing to install_app method

* make formatting changes to the code for flake8

* use reload_module from six instead of builtins

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2019-12-15 12:06:12 +05:30
Gavin D'souza
12912c5943 style: better readability and removed redundant flag 2019-11-17 16:06:24 +05:30
Gavin D'souza
025665a093 fix: update pinned requirements
after pinning requirements, to avoid incompatible 2nd level
dependencies of packages, pass the -U flag
2019-11-17 04:39:33 +05:30
gavin
ce6b4c8a11 fix: git depth, fixed requirements (#845) 2019-10-21 15:48:38 +05:30
Aditya Hase
46b78f4a53 fix: Remove the infamous print style 2019-07-23 19:32:30 +05:30
Saurabh
d32d905567 fix: validate branch before update 2019-07-22 16:10:34 +05:30
Faris Ansari
75b0901af4
fix: Build assets only for downloaded app (#802) 2019-05-15 14:26:07 +05:30
Sagar Vora
21925fa06f fix: syntax error 2019-01-29 23:58:23 +05:30
Sagar Vora
47a9aca0e7 fix: importing reload caused issues in python2 2019-01-29 23:52:31 +05:30
Sagar Vora
4d02801f53
fix: use reload only if imported 2019-01-29 19:51:12 +05:30
Shivam Mishra
fd4be52e32 Removed foundation dependency (#763) 2019-01-22 15:38:01 +05:30
Sagar Vora
856974939b
Merge pull request #747 from Thunderbottom/p3.7-fix
remove-app: fix for python3.7
2019-01-20 10:46:35 +05:30
Sagar Vora
0afb89a2c1 fix: default caching of pip packages, use reload_supervisor function 2018-12-13 09:49:55 +05:30
Chinmay Pai
ce7a5e757d
remove-app: fix for python3.7
"bench remove-app <app>" exits with TypeError on python3.7

converting the subprocess output to string fixes this issue.

Signed-off-by: Chinmay Pai <chinmaydpai@gmail.com>
2018-11-12 13:51:11 +05:30
Chinmay Pai
15d2c8df16
[fix] reload(): use importlib for python3
reload() is an inbuilt function in python2 but has been moved to importlib since python3.4.

source: https://docs.python.org/3/library/importlib.html#importlib.reload

Signed-off-by: Chinmay Pai <chinmaydpai@gmail.com>
2018-09-21 13:47:21 +05:30
Ameya Shenoy
e4e054e840
fix(remove_app): use app name instead of app path
pip 18 does not allow path to repo, instead we use the app name

Signed-off-by: Ameya Shenoy <shenoy.ameya@gmail.com>
2018-09-19 15:32:16 +05:30
Ameya Shenoy
38601eabf8
Merge branch 'master' into multi_fixes 2018-07-03 14:28:48 +05:30
Prateeksha Singh
c33cff5fd8
Revert "get frappe_theme for foundation" 2018-06-26 17:08:01 +05:30
Ameya Shenoy
2395e242cb get frappe_theme for foundation 2018-06-26 14:06:49 +05:30
Rushabh Mehta
c1a8be4791 better way to install docs 2018-06-14 13:29:37 +05:30
Rushabh Mehta
9f917f8464 better way to install docs 2018-06-14 11:24:04 +05:30
Rushabh Mehta
8fc3a87a37 better way to install docs 2018-06-14 10:52:17 +05:30
Rushabh Mehta
c342a82aa1 better way to install docs 2018-06-14 10:37:11 +05:30
Prateeksha Singh
8c5d783716 [install] update frappe,erpnext docs apps to be installed (#677) 2018-06-14 09:10:55 +05:30
Ameya Shenoy
2591da0622 [fix] update fails if no remote found
- The bench update used to fail if there was no remote found for the app.
Fixed by adding check if remote exists. If it doesn't the app is added
to excluded_apps.txt and not considered for an update
- [minor] optimized get_excluded_apps list by calling it only once, as
opposed to getting it for every app
2018-05-15 16:18:02 +05:30
Ameya Shenoy
3b8f9441cc
Merge branch 'master' into systemd 2018-04-14 15:56:26 +05:30
Ameya Shenoy
3ccb1bf0fd
FIXES for exclude app from update PR 2018-04-14 02:24:04 +05:30
Revant Nandgaonkar
624e8bdf63 restart systemd on update 2018-04-11 22:25:47 +05:30
Shridhar
3b5da2960d Rename method names
Removed print statements
2018-04-05 14:47:48 +05:30
shridhar
7013167d8d Include excluded app in bench update
command bench bench include-app <app-name>
2018-04-05 14:46:19 +05:30
shridhar
4e3d7e989e New command to exclude apps when bench update
command bench exclude-app <app-name>
command bench update --exclude-apps
2018-04-05 14:44:29 +05:30
shridhar
bb10b0f94f Include excluded app in bench update
command bench bench include-app <app-name>
2018-04-05 14:41:00 +05:30
shridhar
872460bb2f New command to exclude apps when bench update
command bench exclude-app <app-name>
command bench update --exclude-apps
2018-04-05 14:41:00 +05:30
shridhar
2799a12b2c bench update exclude app 2018-04-05 14:39:51 +05:30
Achilles Rasquinha
d99adf0b28 fallback in case redis isnt running 2018-03-25 13:41:34 +05:30
Achilles Rasquinha
dd813587ac fixes for encoding decoding 2018-03-12 18:25:00 +05:30
Ameya Shenoy
59d6c99614
yarn_fix 2018-02-28 18:48:11 +05:30
Faris Ansari
4ce74759e2 Make bench backward compatible with npm style 2018-02-22 12:38:26 +05:30
Achilles Rasquinha
12224b7086 bytes to str 2018-02-15 12:45:05 +05:30
Achilles Rasquinha
780c1b7488 get apps from both, frappe and erpnext 2018-02-07 17:12:32 +05:30
Makarand Bauskar
d1c73b20d0 [minor] removed upgrade command from switch-to-master and switch-to-develop (#484)
* [minor] remove --upgrade option from bench update

* [minor] removed upgrade command from switch-to-master and switch-to-develop
2017-09-27 13:42:43 +05:30
Rushabh Mehta
b5a029033d Develop (#411)
* [fix] readme

* Removed swtich-to-v4 and switch-to-v5 commands

* consider passwords.txt (#408)

* Fixes bench release github username error (#406)

* ran 2to3 script

* Correct urllib.parse import

* Backward compatible urllib import

* removed test_setup_production_v6

* Fix bug global hashlib is not defined (#399)

* Don't need $query_string (#390)

* removed semicolon, click.prompt adds it

* Letsencrypt fix develop (#407)

* [Fix] Letsencrypt error - Please specify user or filename to write.

* Fix bug global hashlib is not defined (#399)

* Don't need $query_string (#390)

* [Fix] Issue #404 - write to system cron

* letsencrypt.py - renamed user_crontab to system_crontab

* Npm dependency management using package.json (#409)

* Fix bug global hashlib is not defined (#399)

* Don't need $query_string (#390)

* Develop (#400)

* [fix] readme

* Removed swtich-to-v4 and switch-to-v5 commands

* Add "bench setup babel" command

* Add "less" package

* Npm dependency management using package.json

* Add default package.json
2017-05-23 11:14:16 +05:30
Rushabh Mehta
a6a1ee9a82 Develop (#400)
* [fix] readme

* Removed swtich-to-v4 and switch-to-v5 commands
2017-05-19 16:25:51 +05:30
Revant Nandgaonkar
080ca173a6 ran 2to3 script (#381)
* ran 2to3 script

* Correct urllib.parse import

* Backward compatible urllib import

* removed test_setup_production_v6
2017-04-17 17:28:18 +05:30
Makarand Bauskar
a1587b783f [fixes] fixes in pull_all_apps so, bench update can backup and sync sites (#376) 2017-04-07 17:18:21 +05:30
robert schouten
c6e7477abf [hotfix] fix update reset (#374)
@rmehta
2017-04-07 13:33:25 +05:30
Faris Ansari
7946d17cc1 less verbose app install (#369) 2017-04-05 12:17:22 +05:30
ckosiegbu
4eef5d1b1a Update pull_all_apps to use regex for check (#373)
pull_all_apps calls a "git status" and checks if the response contains "nothing to commit, working directory clean". However, it seems that at least some versions of git output the message "nothing to commit, working directory clean". This causes bench update to not work in systems where the output message uses "tree" instead of "directory". This update is to allow both strings to be used.
2017-04-05 12:16:58 +05:30
Rushabh Mehta
893b55991b fix message 2017-04-03 13:11:51 +05:30
Rushabh Mehta
4f37c6cf03 [enhance] check for uncommitted code before pulling 2017-04-03 12:56:53 +05:30
robert schouten
cd877e19cc [feature] add reset option to update (#343)
* [feature] add reset option to update

* fix for restarting update
2016-11-07 17:23:25 +05:30
Viet Pham
a6d9d158b4 Add git utility commands 2016-08-28 19:50:48 +07:00
Anand Doshi
81dbf0b9eb Merge remote-tracking branch 'origin/master' into develop 2016-07-22 15:37:54 +05:30
Valmik Jangla
fa338fb5e1 [fix] test case for remove-app 2016-07-21 12:07:16 +05:30
Valmik Jangla
c3efdb01ab Added command to remove app 2016-07-17 23:26:12 -07:00
Anand Doshi
8ff5519959 [cleanup] bench path 2016-06-16 11:48:06 +05:30
Anand Doshi
e8c3fa5167 [cleanup] bench path 2016-06-16 11:18:51 +05:30
Anand Doshi
47b65ec28f [fix] pull 'upstream' 2016-06-14 18:20:19 +05:30
Rushabh Mehta
253f72fba3 [minor] get-app to check origin and upstream 2016-06-13 18:04:54 +05:30
Anand Doshi
4a9933f8ae Merge branch 'master' into develop 2016-06-10 10:46:03 +05:30
Anand Doshi
2e02ec78a2 [fix] version backward compatibility fix 2016-06-09 18:54:41 +05:30
Anand Doshi
2180069a30 [fix] get_current_version backward compatibility 2016-06-09 18:31:25 +05:30
Anand Doshi
24e37e4991 [fix] get_current_version backward compatibility 2016-06-09 18:26:46 +05:30
Anand Doshi
cb6e33cb0d [fix] git show - app 2016-06-09 18:17:35 +05:30
Anand Doshi
070f80ece6 [fix] git show - app 2016-06-09 18:16:15 +05:30
Anand Doshi
25195d5217 [fix] get version 2016-06-09 16:39:06 +05:30
Anand Doshi
9232d25375 [fix] get version 2016-06-09 16:33:46 +05:30
Anand Doshi
5a22215d62 [fix] test_switch_to_branch - bring frappe back to develop 2016-06-08 12:11:47 +05:30
Valmik Jangla
b0f571108d Added switch-to-branch command 2016-06-08 12:05:45 +05:30
Anand Doshi
a09cc4424a Merge pull request #215 from vjFaLk/get-app
Removed get-app app-name argument
2016-05-18 18:11:15 +05:30
Anand Doshi
9bdb3fc530 [fix] remove pyc files on git pull 2016-05-18 17:20:47 +05:30
Valmik Jangla
cd4c8d6323 Removed get-app arg 2016-05-16 02:33:08 -07:00
Anand Doshi
112ea2e1f8 Merge pull request #210 from vjFaLk/new-app-fix
Added validation for App Name
2016-05-09 15:43:46 +05:30
Valmik Jangla
685536fb96 Added validation for App Name 2016-05-09 11:48:11 +05:30
Anand Doshi
6612c6d6ca [fix] use_rq 2016-05-05 16:23:00 +05:30
Anand Doshi
149dbae7a3 [test] test_setup_production_v6 2016-04-27 22:22:46 +05:30
Rushabh Mehta
13b4825fb6 [fix] shallow clone 2016-03-16 13:03:09 +05:30
Rushabh Mehta
d82a67be9e [cleanup] redis, supervisor, config 2016-03-15 16:57:48 +05:30
Anand Doshi
26356f2b3e [test] python site-packages 2016-02-29 20:07:23 +05:30
shreyas
2a4665ca37 [Fix]
* Generate common_site_config.json while initializing a new bench
* Clean-up some code
2016-02-25 15:47:39 +05:30
Rushabh Mehta
60998dc4b7 [minor] new-app must covert to lowercase 2016-01-28 12:26:31 +05:30
Anand Doshi
5a14a16c51 [minor] enabled loglevel DEBUG 2016-01-11 12:28:02 +05:30
Anand Doshi
245eecdeda [fix] remove wheels as latest pip uses wheels and cache automatically, install pdfkit from git 2015-12-09 18:41:34 +05:30
Anand Doshi
c45cb2b003 bench init --verbose 2015-12-09 00:22:16 +05:30
Pratik Vyas
a067a1845e bench admin changes 2015-11-02 11:48:39 -08:00
saurabh
24012e3a4a [Fixes] indent issue 2015-09-03 12:09:16 +05:30
saurabh
00d607a2be [Fixes] app list fixes for version 5 switching 2015-09-03 11:28:34 +05:30
Pratik Vyas
783a6e7d02 Add switch-to-v5 #142 2015-08-22 16:56:29 -07:00
Anand Doshi
6e26f74250 [fix] bench update --upgrade --force option to force running of pre and post upgrade operations 2015-08-17 15:58:01 +05:30
Anand Doshi
05b8d22f44 [fix] don't use async if invoked from command line 2015-08-15 23:00:33 +05:30
Pratik Vyas
cd6b4d10c9 Fix bench update fix # 126 2015-08-12 23:25:45 -07:00
Rushabh Mehta
0ff2561881 async option in exec_cmd and cousin 2015-07-28 14:40:48 +05:30
Pratik Vyas
bc7376b188 Async 2015-07-16 10:51:56 +05:30
Anand Doshi
9e7248d11b [minor] better exception msg - Current branch of 'frappe' not in upstream 2015-06-24 10:17:38 -04:00
Pratik Vyas
c41e3137c5 Revert "Add reference feature"
This reverts commit 220405103c.
2015-06-08 08:49:07 +05:30
Pratik Vyas
220405103c Add reference feature 2015-06-07 17:02:30 +05:30
Pratik Vyas
1b52081da3 Better upgrade message on switch branch 2015-05-06 14:33:00 +05:30
Pratik Vyas
c2acc81cd4 Fix remote.upstream.fetch if --branch was used to get-app 2015-05-06 10:55:53 +05:30
Pratik Vyas
e5088d28b6 update requirements before pre upgrade 2015-05-06 10:44:51 +05:30
Pratik Vyas
de9427476d reset cronjobs on upgrade and merge on switching branches 2015-05-06 10:20:55 +05:30
Pratik Vyas
d8f0147ef1 Version upgrade on switching branches 2015-05-04 11:34:52 +05:30
Pratik Vyas
52bfaa0272 add switch to develop and remove migrate-to-v5 2015-03-17 16:50:43 +05:30
Pratik Vyas
b559572277 add branch switching commands and update release script 2015-03-17 09:00:33 +05:30
Pratik Vyas
b13adc28f2 fix bench init with v4 2015-03-17 09:00:33 +05:30
Pratik Vyas
0f74b9b47e Fix new-app 2015-03-17 09:00:33 +05:30
Pratik Vyas
2b5df6f516 v5 migration fixes 2015-03-17 09:00:33 +05:30
Pratik Vyas
c24a904ad6 v5 upgrade 2015-03-17 09:00:33 +05:30
Pratik Vyas
b659e595a2 fix get current frappe version 2015-03-17 08:59:39 +05:30
Pratik Vyas
0ed4726452 fix run_frappe_cmd 2015-03-17 08:59:39 +05:30
Pratik Vyas
feceb591d4 fix get current frappe version 2015-03-17 08:59:38 +05:30
Pratik Vyas
33a63f2343 migrate frappe calls to v5 2015-03-17 08:59:38 +05:30
Pratik Vyas
cbc1962316 Add redis cache 2015-03-17 08:59:38 +05:30
Pratik Vyas
d3d873bff9 Warn if upgrading to next major version 2015-03-17 08:59:38 +05:30
Rushabh Mehta
f09efcb0ae [minor] fixes for new-app and new-site 2015-02-10 12:39:04 +05:30
Pratik Vyas
c8cfe4300d fix install_apps_from_path 2014-12-03 11:05:12 +05:30
Pratik Vyas
91c2de9afb build assets only once if installing from a list from path 2014-12-03 10:54:40 +05:30
Pratik Vyas
bbf38c7faf remove from appstxt 2014-11-21 17:19:56 +05:30
Pratik Vyas
9e81bda10f fix #68 2014-10-31 15:57:31 +05:30
Pratik Vyas
bcd3a6de48 assume about HEAD no more 2014-10-30 12:38:50 +05:30
Pratik Vyas
3c30074078 be quiet, fix #55 2014-10-01 00:15:09 +05:30
Pratik Vyas
196278e7bf add support for app branches 2014-09-12 15:00:18 +05:30
Pratik Vyas
e22ea566dd restart supervisor processes if configured after getting an app 2014-09-10 16:50:17 +05:30
Pratik Vyas
d631cc4997 fix app.py 2014-09-05 09:28:55 +05:30