コード例 #1
0
def update_translations(new_version_number):
    if util.unstaged_changes_present(all_repos):
        raise Exception("One of your repositories has un-staged changes, " +
                        "please stash them and try again")
    # TODO PLM: run this on J2ME releases:
    # new_javarosa_text = get_updated_translations(j2me_repo,
    #                                              javarosa_subfolder,
    #                                              javarosa_filename)
    # new_commcare_text = get_updated_translations(j2me_repo,
    #                                              commcare_subfolder,
    #                                              commcare_filename)
    new_ccodk_text = get_updated_translations(commcare_android_repo,
                                              ccodk_messages_subfolder,
                                              ccodk_messages_filename)
    new_strings_text = get_updated_strings_block()
    new_text_blocks = [
        new_ccodk_text,
        new_strings_text,
        # new_javarosa_text, new_commcare_text,
    ]

    new_branch_name = checkout_new_translations_branch(new_version_number)
    new_file_name = create_updated_translations_file(new_text_blocks,
                                                     new_version_number)
    commit_and_push_new_branch(new_version_number, new_branch_name,
                               new_file_name)
コード例 #2
0
def create_branches_and_update_versions(branch_base, version):
    if util.unstaged_changes_present(REPOS):
        raise Exception("one of the branches has unstaged changes, " +
                        "please stash and try again")
    util.pull_masters(REPOS)

    branch_name = "{}{}".format(branch_base, version)
    if util.branch_exists_in_repos(branch_name, REPOS):
        raise Exception("commcare_{} branch already exists".format(version))

    create_release_branches(branch_name)
    update_version_numbers()
コード例 #3
0
ファイル: git_utils.py プロジェクト: dimagi/mobile-deploy
def create_branches_and_update_versions(branch_base, version):
    if util.unstaged_changes_present(REPOS):
        raise Exception("one of the branches has unstaged changes, " +
                        "please stash and try again")
    util.pull_masters(REPOS)

    branch_name = "{}{}".format(branch_base, version)
    if util.branch_exists_in_repos(branch_name, REPOS):
        raise Exception("commcare_{} branch already exists".format(version))

    create_release_branches(branch_name)
    update_version_numbers()
コード例 #4
0
def create_release_tags(branch_base, version):
    if util.unstaged_changes_present(REPOS):
        raise Exception("A branch has unstaged changes, stash and try again")

    branch_name = "{}{}".format(branch_base, version.short_string())
    tag_name = "{}{}".format(branch_base, version)

    if not util.branch_exists_in_repos(branch_name, REPOS):
        raise Exception("{} branch doesn't exist".format(branch_name))

    # TODO PLM: run this on J2ME releases:
    # mark_version_as_release(branch_name)
    add_hotfix_version_to_android(branch_name, 0)
    create_tags_for_repos(branch_name, tag_name)

    return tag_name
コード例 #5
0
ファイル: git_utils.py プロジェクト: dimagi/mobile-deploy
def create_release_tags(branch_base, version):
    if util.unstaged_changes_present(REPOS):
        raise Exception("A branch has unstaged changes, stash and try again")

    branch_name = "{}{}".format(branch_base, version.short_string())
    tag_name = "{}{}".format(branch_base, version)

    if not util.branch_exists_in_repos(branch_name, REPOS):
        raise Exception("{} branch doesn't exist".format(branch_name))

    # TODO PLM: run this on J2ME releases:
    # mark_version_as_release(branch_name)
    add_hotfix_version_to_android(branch_name, 0)
    create_tags_for_repos(branch_name, tag_name)

    return tag_name
コード例 #6
0
def update_translations(new_version_number):
    if util.unstaged_changes_present(all_repos):
        raise Exception("One of your repositories has un-staged changes, " + "please stash them and try again")
    # TODO PLM: run this on J2ME releases:
    # new_javarosa_text = get_updated_translations(j2me_repo,
    #                                              javarosa_subfolder,
    #                                              javarosa_filename)
    # new_commcare_text = get_updated_translations(j2me_repo,
    #                                              commcare_subfolder,
    #                                              commcare_filename)
    new_ccodk_text = get_updated_translations(commcare_android_repo, ccodk_messages_subfolder, ccodk_messages_filename)
    new_strings_text = get_updated_strings_block()
    new_text_blocks = [
        new_ccodk_text,
        new_strings_text,
        # new_javarosa_text, new_commcare_text,
    ]

    new_branch_name = checkout_new_translations_branch(new_version_number)
    backup_old_translations_file()
    create_updated_translations_file(new_text_blocks)
    commit_and_push_new_branch(new_version_number, new_branch_name)