##// END OF EJS Templates
core: added two new commands rcsetup-app and rcupgrade-db that will...
marcink -
r2007:e0e75f82 default
parent child Browse files
Show More
@@ -0,0 +1,35 b''
1 # -*- coding: utf-8 -*-
2
3 # Copyright (C) 2016-2017 RhodeCode GmbH
4 #
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU Affero General Public License, version 3
7 # (only), as published by the Free Software Foundation.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU Affero General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 #
17 # This program is dual-licensed. If you wish to learn more about the
18 # RhodeCode Enterprise Edition, including its added features, Support services,
19 # and proprietary license terms, please see https://rhodecode.com/licenses/
20
21 import click
22
23 from pyramid.paster import bootstrap
24 from pyramid.request import Request
25 import pyramid.paster
26
27
28 @click.command()
29 @click.argument('ini_path', type=click.Path(exists=True))
30 def main(ini_path):
31 pyramid.paster.setup_logging(ini_path)
32
33 request = Request.blank('/', base_url='https://rhodecode-app.com/')
34 with bootstrap(ini_path, request=request) as env:
35 print(env['request'].application_url) No newline at end of file
@@ -0,0 +1,37 b''
1 # -*- coding: utf-8 -*-
2
3 # Copyright (C) 2016-2017 RhodeCode GmbH
4 #
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU Affero General Public License, version 3
7 # (only), as published by the Free Software Foundation.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU Affero General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 #
17 # This program is dual-licensed. If you wish to learn more about the
18 # RhodeCode Enterprise Edition, including its added features, Support services,
19 # and proprietary license terms, please see https://rhodecode.com/licenses/
20
21 import click
22
23 from pyramid.paster import bootstrap
24 from pyramid.request import Request
25 import pyramid.paster
26
27
28 @click.command()
29 @click.argument('ini_path', type=click.Path(exists=True))
30 def main(ini_path):
31 pyramid.paster.setup_logging(ini_path)
32
33 request = Request.blank('/', base_url='https://rhodecode-app.com/')
34 with bootstrap(ini_path, request=request) as env:
35 print(env['request'].application_url)
36
37
@@ -249,6 +249,8 b' setup('
249 ],
249 ],
250 'console_scripts': [
250 'console_scripts': [
251 'rcserver=rhodecode.rcserver:main',
251 'rcserver=rhodecode.rcserver:main',
252 'rcsetup-app=rhodecode.lib.rc_commands.setup_rc:main',
253 'rcupgrade-db=rhodecode.lib.rc_commands.upgrade_db:main',
252 ],
254 ],
253 'beaker.backends': [
255 'beaker.backends': [
254 'memorylru_base=rhodecode.lib.memory_lru_debug:MemoryLRUNamespaceManagerBase',
256 'memorylru_base=rhodecode.lib.memory_lru_debug:MemoryLRUNamespaceManagerBase',
General Comments 0
You need to be logged in to leave comments. Login now