     for item in ["AVOSCloud.podspec", "AVOSCloudIM.podspec", "AVOSCloudLiveQuery.podspec"] {
         switch bash(command: "pod", arguments: ["trunk", "push", item, "--allow-warnings"]) {
         case .success(let info): print(info as! String)
-        case .fail(let error): print(error)
+        case .fail(let error):
+            print(error)
+            return
         }
         switch bash(command: "pod", arguments: ["repo", "update"]) {
         case .success(let info): print(info as! String)
-        case .fail(let error): print(error)
+        case .fail(let error):
+            print(error)
+            return
         }
     }
 }

    return build_result
}

func generate_podspec(version: String) -> Result {
    
    let check_installed_xcodeproj_result: Result = bash(

            case .success(let info): print(info as! String)
            case .fail(let error): print(error)
            }
        case "release": pod_trunk_push()
        case "doc": doc_update()
        default: print("❌ error arguments.")
        }
    } else {
        switch current_version() {
        case .success(let info):
            let currentVersion: String = info as! String
            print("current version: \(currentVersion)\n")
            print("if you want to release with new version, please input version: \n")
            let newVersion: String = readLine()!
            switch validate_version(version: newVersion) {
            case .success(_):
                switch build() {
                case .success(let info): print(info as! String)
                case .fail(let error):
                    print(error)
                    return
                }
                switch generate_podspec(version: newVersion) {
                case .success(let info): print(info as! String)
                case .fail(let error):
                    print(error)
                    return
                }
                switch git_commit_push(version: newVersion) {
                case .success(let info): print(info as! String)
                case .fail(let error):
                    print(error)
                    return
                }
            case .fail(let error): print(error)
            }
        case .fail(let error): print(error)
        }
    }
}
