Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[请立即更新] 由于pgyer API v1 接口即将过期, 请尽快升级至少至 0.2.3 版本 #17

Open
jicheng1014 opened this issue Aug 22, 2022 · 4 comments

Comments

@jicheng1014
Copy link
Collaborator

由于 0.2.2 及更老的版本依赖 pgyer API v1 接口, API v1 接口即将停止服务, 请尽快升级至0.2.3版本

@hubin97
Copy link

hubin97 commented Sep 15, 2022

这更新后ipa路径如何配置, 不给个例子说明一下吗? 我这边试了都找不到路径? 无论是指向gym输出的文件夹还是ipa文件都没用

@jicheng1014
Copy link
Collaborator Author

@hubin97 请参考下 https://github.com/shishirui/fastlane-plugin-pgyer/blob/master/lib/fastlane/plugin/pgyer/actions/pgyer_action.rb#L140-L152 这个是 fastlane-plugin 的标准参数列表, 里面有你需要的参数

@hubin97
Copy link

hubin97 commented Sep 20, 2022

@jicheng1014

我看了下文件中描述 ipa字段

 description: "Path to your IPA file. Optional if you use the _gym_ or _xcodebuild_ action. For Mac zip the .app. For Android provide path to .apk file",

请问下, 我已由gym打包处ipa文件,但是可能网络或者其他原因, 我的包没上传;
那么如果我单独另起一个lane仅为了上传包, 且ipa我填了前面gym的输出路径, 但是我发现一直报路径错误
大佬, 此时如果我需要单独使用插件去上传完成后续的操作, 该如何操作?

require 'json'
  desc "FastLane only pgyer dingtalk"
  lane :pgyer_dingtalk do
        # 获取版本信息和提交内容
        $appName = "AppName"
        $versionNo = "#{get_version_number}"
        $buildNo = "#{get_build_number}"
        $folder_name = "#{$versionNo}_build#{$buildNo}"
        $output_path = "~/Documents/fastlane/release/AppName_#{$folder_name}"
        $commit_hash = last_git_commit[:abbreviated_commit_hash] + " " + last_git_commit[:message]
        $update_content = "Fastlane(ios): Release \n v2.5.x 测试版本更新"

        puts "更新版本: #{$folder_name}"
        puts "输出路径: #{$output_path}"
        puts "更新内容: #{$update_content}"

        # 上传 ipa 文件到 fir
        # fastlane action pgyer
        # https://docs.fastlane.tools/actions/pgyer
        pgyer(
            api_key: "ca72xxx86d42",
            #user_key: "6e4aeb737xxx2c340ee5",
            ipa: "#{$output_path}/AppName.ipa", ## ??? 
            install_type: "2", # fastlane 错误之 PGYER Plugin Error
            password: "123456",#"123456Zz",
            update_description: "#{$update_content}"
        )
    
        # 2021 年 6 月 28 日 开始,bugly 不再支持使用 openApi 的方式上传符号表,需要使用官方提供的命令行上传工具进行上传。 本插件当前使用的工具版本为:3.3.4
        upload_dsym_to_bugly(
            file_path: "#{$output_path}/AppName.app.dSYM.zip",
            app_key: "1976exxxb004729",
            app_id:"91xxb5a",
            bundle_id: 'com.xx.AppName',
            version: get_version_number,
            raise_if_error: false
        )               

        msgbody={
          "msgtype": "markdown",
          ...
        }
    
         $cmd1="curl 'https://oapi.dingtalk.com/robot/send?access_token=2c485b2142ca6xxx41ae11e'"
         $cmd2="-H 'Content-Type: application/json'"
         $message=msgbody.to_json
         $cmd3="-d '#{$message}'"
         $dcommand ="#{$cmd1} #{$cmd2} #{$cmd3}"
    
         puts " 即将发送钉钉群通知 ~> #{$dcommand}"
         exec "#{$dcommand}"

  end

@jicheng1014
Copy link
Collaborator Author

jicheng1014 commented Sep 27, 2022

单独运行 指令

fastlane run pgyer apikey:xxxxxxxxxx你的tokenxxxxxx apk:/Users/atpking/desktop/1__1_.apk

另外 ~ 这种路径在脚本里如果你环境变量没配置正确, 是读不到的 建议你使用完整的路径

@hubin97

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants