class TYCiCore::RepoReleaseGit

Public Instance Methods

prepare(item) click to toggle source
# File lib/tuya/ci/core/spec/release/repo_release_git.rb, line 4
def prepare(item)
        local_path = "#{TYCiCore::CI_RELEASE_WORKSPACE}#{item.project_github_name}"

        git_remote_repo_exist = TYCiCore::Git.git_remote_repo_exist? item.project_github_url
        local_file_exist = File.exist? local_path

        if git_remote_repo_exist
                if local_file_exist
                        # git is ok?
                        if 1
                                # end
                        else
                                # delete
                        end
                else
                        # git clone
                end
        else
                TYUtil::TYFile.delete local_path if local_file_exist
                # create new
        end
end