コード例 #1
0
def _update_feconf():
    # Do prerequisite checks.
    common.require_cwd_to_be_oppia()
    assert common.get_current_branch_name().startswith('release-')
    common.ensure_release_scripts_folder_exists_and_is_up_to_date()

    _apply_changes_to_feconf()
    print 'Done! Please check manually to ensure all the changes are correct.'
コード例 #2
0
ファイル: update_configs.py プロジェクト: ledriod/oppia
def _update_configs():
    """Updates the 'feconf.py' and 'constants.js' files after doing the
    prerequisite checks.
    """
    # Do prerequisite checks.
    common.require_cwd_to_be_oppia()
    assert common.get_current_branch_name().startswith('release-')
    common.ensure_release_scripts_folder_exists_and_is_up_to_date()

    _apply_changes_based_on_config(
        LOCAL_FECONF_PATH, FECONF_CONFIG_PATH, '^([A-Z_]+ = ).*$')
    _apply_changes_based_on_config(
        LOCAL_CONSTANTS_PATH, CONSTANTS_CONFIG_PATH, '^(  "[A-Z_]+": ).*$')

    print 'Done! Please check manually to ensure all the changes are correct.'
コード例 #3
0
ファイル: deploy.py プロジェクト: CodeTheChange-Oppia/Oppia
APP_NAME_OPPIASERVER = 'oppiaserver'
APP_NAME_OPPIATESTSERVER = 'oppiatestserver'

PARSED_ARGS = _PARSER.parse_args()
if PARSED_ARGS.app_name:
    APP_NAME = PARSED_ARGS.app_name
    if APP_NAME not in [
            APP_NAME_OPPIASERVER, APP_NAME_OPPIATESTSERVER] and (
                'migration' not in APP_NAME):
        raise Exception('Invalid app name: %s' % APP_NAME)
else:
    raise Exception('No app name specified.')

CURRENT_DATETIME = datetime.datetime.utcnow()

CURRENT_BRANCH_NAME = common.get_current_branch_name()

RELEASE_DIR_NAME = 'deploy-%s-%s-%s' % (
    '-'.join('-'.join(APP_NAME.split('.')).split(':')),
    CURRENT_BRANCH_NAME,
    CURRENT_DATETIME.strftime('%Y%m%d-%H%M%S'))
RELEASE_DIR_PATH = os.path.join(os.getcwd(), '..', RELEASE_DIR_NAME)

APPCFG_PATH = os.path.join(
    '..', 'oppia_tools', 'google_appengine_1.9.67', 'google_appengine',
    'appcfg.py')

LOG_FILE_PATH = os.path.join('..', 'deploy.log')
THIRD_PARTY_DIR = os.path.join('.', 'third_party')
DEPLOY_DATA_PATH = os.path.join(
    os.getcwd(), os.pardir, 'release-scripts', 'deploy_data', APP_NAME)