1 个不稳定版本
0.1.0 | 2019年8月8日 |
---|
#27 in #crash
13 个星标 & 7 个关注者
51KB
1K SLoC
recrep
轻松生成崩溃报告。
recrep 使用 AppCenter API 为指定的组织、应用程序和可选版本编译崩溃报告。如果没有指定版本,则使用最新版本。
如何使用
运行 recrep 最简单的方法是使用 cargo。克隆此存储库,并在命令前添加 cargo run --
。
$ cargo run -- --help
Finished dev [unoptimized + debuginfo] target(s) in 0.27s
Running `target/debug/recrep --help`
recrep 0.1.1
The Mobile Releases Team of XING SE <mobile_releases@xing.com>
Recycled Crep: Look at your crashes.
USAGE:
recrep [OPTIONS] --application <application> --organization <organization> --token <token>
FLAGS:
--arithmetic-mean Use the arithmetic mean as threshold value, and only show crashes exceeding this value.
This flag is incompatible with `--threshold`.
-h, --help Prints help information
OPTIONS:
-a, --application <application> The application identifier as seen in AppCenter urls.
-g, --group <distribution-group> Distribution group used to search for the latest version released into this
distribution group.
-c, --organization <organization> The organization the app belongs to.
-o, --outfile <outfile> An optional filename to write the report to instead of printing it to the
console.
-m, --threshold <threshold> Set a threshold value determining a maximum amount of crashes and show a
percentage of how many percent are reached for each crash in the crash list.
-t, --token <token> The AppCenter API token [env: RECREP_APPCENTER_API_TOKEN=]
-v, --version <version> The app version. If none is specified, the latest available version will be
picked - be aware that the latest version might not have crashes yet.
可以通过环境变量 RECREP_APPCENTER_API_TOKEN
提供token。
示例
这将检索给定组织的最新可用版本的崩溃报告。如果您想检索特定版本的崩溃报告,可以提供额外的参数:--version 1.2.3
。
$ cargo run -- --organization XING-SE-Organization --application XING
Finished dev [unoptimized + debuginfo] target(s) in 0.27s
Running `target/debug/recrep --organization XING-SE-Organization --application XING`
Hello everyone!
This is the crash newsletter of v7.41.3 💌
First appeared on 2019-05-17T04:03:49Z and occurred 329 times in 7.41.3/10167 and affected 330 devices.
File: NSManagedObjectContext+XNGManagedObjectContextObservable.m
Class: XNGManagedObjectContextObservable
Method: notifyObserversWithContext:changeInfo:
More on AppCenter: https://appcenter.ms/orgs/XING-SE-Organization/apps/XING/crashes/errors/1005734617u/overview.
-------------------------------
First appeared on 2019-05-16T18:35:54Z and occurred 123 times in 7.41.3/...
测试
您可以运行 cargo test
来执行所有测试。
构建
muslrust 允许我们使用 musl 工具链构建 Rust 可执行文件,如果您想为 Linux 进行交叉编译,这很方便。
- muslrust 是基于 Docker 的,因此启动 Docker
- 构建应用程序
docker pull clux/muslrust
docker run -v $PWD:/volume --rm -t clux/muslrust cargo build --release
- 这会构建 recrep 的发布版本,并将其放置到
./target/x86_64-unknown-linux-musl/release/
- 将
recrep
可执行文件复制到要执行的地方
文档
您可以通过运行以下命令生成并打开文档:cargo doc --open
依赖
约26MB
约538K SLoC