Skip to content

Commit 4d4a896

Browse files
committed
document global CLI usage
1 parent c5b972e commit 4d4a896

2 files changed

Lines changed: 22 additions & 14 deletions

File tree

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,26 @@ A React Native Update command line tool for bundling, uploading native packages,
1414
## Installation
1515

1616
```bash
17-
npm install react-native-update-cli
17+
npm install -g react-native-update-cli
1818
```
1919

20+
The command-line tool is installed globally. Invoke `pushy` or `cresc` directly; do not use a project-local CLI or prefix commands with `npx`.
21+
2022
## Basic Usage
2123

2224
```bash
23-
npx pushy help
24-
npx pushy list
25+
pushy help
26+
pushy list
2527

26-
npx pushy bundle --platform ios
27-
npx pushy publish --platform ios --name 1.0.0
28-
npx pushy uploadIpa ./app.ipa
28+
pushy bundle --platform ios
29+
pushy publish --platform ios --name 1.0.0
30+
pushy uploadIpa ./app.ipa
2931
```
3032

3133
## Programmatic Usage
3234

35+
The Provider API is a library integration, separate from the globally installed CLI. Add the package to build-tool dependencies only when importing this API; command-line usage continues to use the global `pushy` / `cresc` binaries.
36+
3337
```typescript
3438
import { CLIProviderImpl } from 'react-native-update-cli';
3539

@@ -147,7 +151,7 @@ sentry-cli sourcemaps upload --debug-id-reference
147151
For older self-hosted Sentry versions or older `@sentry/cli` versions without Debug ID support, pass explicit legacy release/dist values:
148152

149153
```bash
150-
npx pushy bundle --platform android --name "4.1" --sentry-release "com.example@1.0.0+10+pushy:4.1" --sentry-dist "pushy:4.1"
154+
pushy bundle --platform android --name "4.1" --sentry-release "com.example@1.0.0+10+pushy:4.1" --sentry-dist "pushy:4.1"
151155
```
152156

153157
In legacy mode, the app runtime must report exactly the same Sentry `release` and `dist` values.

README.zh-CN.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,26 @@ React Native Update 命令行工具,用于打包、上传原生包、发布 OT
1414
## 安装
1515

1616
```bash
17-
npm install react-native-update-cli
17+
npm install -g react-native-update-cli
1818
```
1919

20+
命令行工具始终全局安装,直接调用 `pushy``cresc`;不要使用项目本地 CLI,也不要给命令添加 `npx` 前缀。
21+
2022
## 基础用法
2123

2224
```bash
23-
npx pushy help
24-
npx pushy list
25+
pushy help
26+
pushy list
2527

26-
npx pushy bundle --platform ios
27-
npx pushy publish --platform ios --name 1.0.0
28-
npx pushy uploadIpa ./app.ipa
28+
pushy bundle --platform ios
29+
pushy publish --platform ios --name 1.0.0
30+
pushy uploadIpa ./app.ipa
2931
```
3032

3133
## 编程调用
3234

35+
Provider API 属于库集成,与全局 CLI 分开。只有在代码中导入该 API 时才把包加入构建工具依赖;命令行仍然使用全局的 `pushy` / `cresc`
36+
3337
```typescript
3438
import { CLIProviderImpl } from 'react-native-update-cli';
3539

@@ -147,7 +151,7 @@ sentry-cli sourcemaps upload --debug-id-reference
147151
旧版 self-hosted Sentry 或旧版 `@sentry/cli` 不支持 Debug ID 时,可以显式指定 legacy release/dist:
148152

149153
```bash
150-
npx pushy bundle --platform android --name "4.1" --sentry-release "com.example@1.0.0+10+pushy:4.1" --sentry-dist "pushy:4.1"
154+
pushy bundle --platform android --name "4.1" --sentry-release "com.example@1.0.0+10+pushy:4.1" --sentry-dist "pushy:4.1"
151155
```
152156

153157
这种 legacy 模式要求 App 运行时上报到 Sentry 的 `release``dist` 与上传参数完全一致。

0 commit comments

Comments
 (0)