##// END OF EJS Templates
docker: added all the initial docker files...
docker: added all the initial docker files compose: added initial setup - fix db password secret, fix SVN as aservice 4.24.0 changes Docker: fixes for 4.24.X deployment Setup: added final fixes Config files cleanups Fix license fix

File last commit:

r1:29323844
r1:29323844
Show More
apply_license.py
31 lines | 681 B | text/x-python | PythonLexer
"""
echo "%run path/create_docs_repo.py" | rc-ishell .dev/dev.ini
"""
import os
from rhodecode.model.db import Session
LICENSE_FILE_NAME = 'rhodecode_enterprise.license'
def main():
license_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), LICENSE_FILE_NAME)
if not os.path.isfile(license_file):
print('No license file at {}'.format(license_file))
return
try:
from rc_license.models import apply_license
except ImportError:
print('Cannot import apply_license')
return
with open(license_file, 'r') as f:
license_data = f.read()
apply_license(license_data)
Session().commit()
main()