diff --git a/README.md b/README.md index 7a2fd62..4104103 100644 --- a/README.md +++ b/README.md @@ -14,22 +14,26 @@ A React Native Update command line tool for bundling, uploading native packages, ## Installation ```bash -npm install react-native-update-cli +npm install -g react-native-update-cli ``` +The command-line tool is installed globally. Invoke `pushy` or `cresc` directly; do not use a project-local CLI or prefix commands with `npx`. + ## Basic Usage ```bash -npx pushy help -npx pushy list +pushy help +pushy list -npx pushy bundle --platform ios -npx pushy publish --platform ios --name 1.0.0 -npx pushy uploadIpa ./app.ipa +pushy bundle --platform ios +pushy publish --platform ios --name 1.0.0 +pushy uploadIpa ./app.ipa ``` ## Programmatic Usage +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. + ```typescript import { CLIProviderImpl } from 'react-native-update-cli'; @@ -147,7 +151,7 @@ sentry-cli sourcemaps upload --debug-id-reference For older self-hosted Sentry versions or older `@sentry/cli` versions without Debug ID support, pass explicit legacy release/dist values: ```bash -npx pushy bundle --platform android --name "4.1" --sentry-release "com.example@1.0.0+10+pushy:4.1" --sentry-dist "pushy:4.1" +pushy bundle --platform android --name "4.1" --sentry-release "com.example@1.0.0+10+pushy:4.1" --sentry-dist "pushy:4.1" ``` In legacy mode, the app runtime must report exactly the same Sentry `release` and `dist` values. diff --git a/README.zh-CN.md b/README.zh-CN.md index 11d5cee..9f2ccec 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -14,22 +14,26 @@ React Native Update 命令行工具,用于打包、上传原生包、发布 OT ## 安装 ```bash -npm install react-native-update-cli +npm install -g react-native-update-cli ``` +命令行工具始终全局安装,直接调用 `pushy` 或 `cresc`;不要使用项目本地 CLI,也不要给命令添加 `npx` 前缀。 + ## 基础用法 ```bash -npx pushy help -npx pushy list +pushy help +pushy list -npx pushy bundle --platform ios -npx pushy publish --platform ios --name 1.0.0 -npx pushy uploadIpa ./app.ipa +pushy bundle --platform ios +pushy publish --platform ios --name 1.0.0 +pushy uploadIpa ./app.ipa ``` ## 编程调用 +Provider API 属于库集成,与全局 CLI 分开。只有在代码中导入该 API 时才把包加入构建工具依赖;命令行仍然使用全局的 `pushy` / `cresc`。 + ```typescript import { CLIProviderImpl } from 'react-native-update-cli'; @@ -147,7 +151,7 @@ sentry-cli sourcemaps upload --debug-id-reference 旧版 self-hosted Sentry 或旧版 `@sentry/cli` 不支持 Debug ID 时,可以显式指定 legacy release/dist: ```bash -npx pushy bundle --platform android --name "4.1" --sentry-release "com.example@1.0.0+10+pushy:4.1" --sentry-dist "pushy:4.1" +pushy bundle --platform android --name "4.1" --sentry-release "com.example@1.0.0+10+pushy:4.1" --sentry-dist "pushy:4.1" ``` 这种 legacy 模式要求 App 运行时上报到 Sentry 的 `release` 和 `dist` 与上传参数完全一致。