Skip to main content

ネイティブビルドコマンドのラッピング

起動後、トリガーとなるすべてのコマンドにプレフィックスを付けます ネイティブ でビルド bitrise-build-cache react-native run。ラッパー

  • 保証します ccache ストレージヘルパーはビルド中実行中です。

  • キャッシュヒット率を追跡し、分析結果をBitriseに報告します。

  • 引数を転送し、 stdinstdoutstderr、コマンドの終了コードはそのままです。

変更前:

npx react-native run-android

後:

bitrise-build-cache react-native run npx react-native run-android

これはどんなパッケージマネージャーやビルドツールでも使えます:

# yarn
bitrise-build-cache react-native run yarn build:android

# npm
bitrise-build-cache react-native run npm run build:ios

# expo
bitrise-build-cache react-native run expo build:ios

# pnpm
bitrise-build-cache react-native run pnpm run build:android

# fastlane
bitrise-build-cache react-native run fastlane beta

# Direct Gradle invocation
bitrise-build-cache react-native run ./gradlew assembleRelease

最終的に Gradle または Xcode を呼び出すコマンドをラップするだけで済みます。プレーンな JSyarn installyarn testなど)を包む必要はありません。