/var/lib/gems/2.7.0/gems/app-info-2.5.4/lib/app_info.rb:30:in `parse': app_info.txt (AppInfo::NotFoundError)
Closed this issue · 10 comments
sudo gem install app-info
终端执行 ruby app_info.rb
require 'app-info'
Description: 获取APP包信息
puts ARGV.to_s
Automatic detect file extsion and parse
apk = AppInfo.parse(ARGV[1])
属性文档: https://github.com/icyleaf/app_info/tree/master/spec/app_info
app_name = apk.name
app_version = apk.release_version
app_build_version = apk.build_version
app_size = apk.size(true)
app_identifier = apk.bundle_id
app_os = apk.os
app_info = "#{app_name},#{app_version},#{app_size},#{app_build_version},#{app_identifier},#{app_os}"
Fastlane与Jenkins数据通信 使用存到文件再读取文件的方式
File.write(ARGV[2], "#{app_info}")
你的 ARGV[1]
是啥,感觉没有正确传参
你的
ARGV[1]
是啥,感觉没有正确传参
是动态参数 如 执行命令 ruby app_info.ruby android.apk , 这几个参数都打印出来了,传入的应该是对的,除非有字符啥的问题
那为什么报错提示是 app_info.txt
文件而不是你传的 android.apk
?
如果文件路径没有问题但不支持文件类型会报 Sorry, AppInfo can not detect file type: /path/to/file (AppInfo::UnkownFileTypeError)
我错了,数组下标写错了,现在好了,感谢贡献工具库,最早用fastlane那个插件,发现还有各种不适合,现在改用ruby这个库了
app-info fastlane 插件仅仅是可视化常用元数据和数据使用,不太适合定制化比较多的场景,当然如果你想详细展开下我也会思考下是否有必要做扩展 😄
ios通过fastlane官方插件可以,android是否可以通过代码实现?
android 不太好弄因为 gradle 支持多语言且也没有 DSL 暴露,除非是和开发者约束好在做特定的文件解析,但如果是通过类似 https://github.com/icyleaf/fastlane-plugin-humanable_build_number 传递动态参数就无解了
感谢 感谢 android暂时放弃了,因为需求不大,主要是ios上架的时候必须高于线上版本,所以想做版本对比