コード例 #1
0
ファイル: main.py プロジェクト: gautamsharma1512/build
        if Config.TARGET_ANDROID_VERSION == 10 and "go" not in Config.BUILD_PACKAGE_LIST:
            Config.BUILD_PACKAGE_LIST.append("go")
        Constants.update_android_version_dependencies()
        today = datetime.now(pytz.timezone('Europe/London')).strftime("%a")
        if Config.RELEASE_TYPE.__eq__("canary"):
            Constants.update_sourceforge_release_directory("canary")
        else:
            Constants.update_sourceforge_release_directory("")
        Release.zip(package_list)
        if release_repo is not None:
            release_repo.git_push(
                str(android_version) + ": " + str(commit_message))

if Config.BUILD_CONFIG:
    if FileOp.dir_exists(Constants.config_directory):
        Constants.update_sourceforge_release_directory("config")
        zip_status = Release.zip(['config'])
    else:
        print(Constants.config_directory + " doesn't exist!")

website_repo = None
if FileOp.dir_exists(Constants.website_directory):
    if Config.GIT_CHECK:
        print("Updating the changelog to the website")
        website_repo = Git(Constants.website_directory)
        if website_repo is not None:
            commit_datetime = website_repo.get_latest_commit_date()
            website_repo.update_changelog()
Constants.end_of_function(start_time, "Total time taken by the program")
print("End of the Program")
コード例 #2
0
                                               branch=branch, depth=1)
                    assert repo.__class__ is Repo  # clone an existing repository
                    assert Repo.init(repo_dir).__class__ is Repo
                except Exception as e:
                    print("Exception caught while cloning the repo: " + str(e))
                    try:
                        branch = "main"
                        print(f"git clone -b --depth=1 {branch} https://gitlab.com/nikgapps/{android_version}.git")
                        repo = git.Repo.clone_from(f"https://gitlab.com/nikgapps/{android_version}.git",
                                                   repo_dir,
                                                   branch=branch, depth=1)
                        assert repo.__class__ is Repo  # clone an existing repository
                        assert Repo.init(repo_dir).__class__ is Repo
                    except Exception as e:
                        print("Exception caught while cloning the repo: " + str(e))
                        continue
                Constants.end_of_function(start_time,
                                          f"Time taken to clone -b {branch} gitlab.com/nikgapps/{android_version}.git")
                Config.TARGET_ANDROID_VERSION = int(android_version)
                if FileOp.dir_exists(repo_dir):
                    Constants.update_sourceforge_release_directory("config")
                    zip_status = Release.zip(['config'])
                else:
                    print(f"{repo_dir} doesn't exist!")
            else:
                print(f"There is no config file in {config_folder}, cloning is not required!")
    else:
        print(Constants.config_directory + " doesn't exist!")

Constants.end_of_function(actual_start_time, "Total time taken by the program to build custom builds")