mirror of
https://github.com/frappe/bench.git
synced 2025-01-09 16:36:25 +00:00
[fix] set all patches as executed on bench init
This commit is contained in:
parent
e27c2059ea
commit
0c255b2f96
@ -29,3 +29,11 @@ def run(bench_path):
|
||||
|
||||
# end with an empty line
|
||||
f.write('\n')
|
||||
|
||||
def set_all_patches_executed(bench_path):
|
||||
source_patch_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'patches.txt')
|
||||
target_patch_file = os.path.join(os.path.abspath(bench_path), 'patches.txt')
|
||||
|
||||
with open(target_patch_file, 'w') as tf:
|
||||
with open(source_patch_file, 'r') as sf:
|
||||
tf.write(sf.read())
|
||||
|
@ -30,6 +30,7 @@ def init(path, apps_path=None, no_procfile=False, no_backups=False,
|
||||
from .config.common_site_config import make_config
|
||||
from .config import redis
|
||||
from .config.procfile import setup_procfile
|
||||
from bench.patches import set_all_patches_executed
|
||||
|
||||
if os.path.exists(path):
|
||||
print 'Directory {} already exists!'.format(path)
|
||||
@ -58,6 +59,7 @@ def init(path, apps_path=None, no_procfile=False, no_backups=False,
|
||||
if bench.FRAPPE_VERSION > 5:
|
||||
setup_socketio(bench_path=path)
|
||||
|
||||
set_all_patches_executed(bench_path=path)
|
||||
build_assets(bench_path=path)
|
||||
redis.generate_config(path)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user