Skip to content

srcpush/srcpush-bare-rn-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

srcpush-bare-rn-setup

Codex skill for configuring SrcPush in bare React Native apps.

This skill is intended for OSS or reusable project work where the integration needs to be correct, generic, and safe to share. It covers native Android and iOS wiring, JavaScript runtime setup, deployment-key placeholders, release automation, and CI-friendly config injection.

What It Does

  • Adds or repairs @srcpush/react-native-code-push integration in bare React Native projects.
  • Handles Android native changes such as Gradle wiring, strings.xml, and MainApplication.
  • Handles iOS native changes such as Podfile, AppDelegate, and Info.plist.
  • Adds safe placeholders for deployment keys and other managed config.
  • Produces release script patterns for Android and iOS.
  • Supports CI or local config injection through scripts/inject-srcpush-config.js.

When To Use It

Use this skill when Codex needs to:

  • set up SrcPush in an existing bare React Native app
  • migrate from AppCenter CodePush or another CodePush fork
  • add release scripts or CI workflows for SrcPush deployments
  • inject deployment config into tracked native files without committing secrets

Project Layout

.
├── SKILL.md
├── agents/
│   └── openai.yaml
├── references/
│   ├── native-integration.md
│   └── release-and-ci.md
└── scripts/
    └── inject-srcpush-config.js

Key Files

  • SKILL.md: main skill instructions, workflow, output shape, and guardrails.
  • agents/openai.yaml: display metadata and the default prompt used to invoke the skill.
  • references/native-integration.md: expected Android, iOS, and JS integration patterns.
  • references/release-and-ci.md: release script templates, CI shape, and secret-handling guidance.
  • scripts/inject-srcpush-config.js: helper to write real deployment values into strings.xml and Info.plist from environment-driven inputs.

How Codex Should Use This Skill

Typical invocation:

Use $srcpush-bare-rn-setup to configure SrcPush in this bare React Native app.

Expected workflow:

  1. Inspect the app structure and current React Native / CodePush setup.
  2. Add @srcpush/react-native-code-push as the runtime dependency.
  3. Patch Android native integration.
  4. Patch iOS native integration.
  5. Add JS runtime sync behavior.
  6. Add generic release commands and CI-safe placeholders.
  7. Keep secrets in environment variables or CI, not in tracked files.

Guardrails

  • Do not hardcode private deployment keys, access keys, signing keys, bundle IDs, or internal endpoints.
  • Prefer placeholders such as YOUR_IOS_DEPLOYMENT_KEY and YOUR_SRCPUSH_APP_NAME.
  • Preserve existing working logic if the app already uses AppCenter CodePush or a forked setup.
  • Keep tracked output reusable across repositories instead of copying values from private projects.

Config Injection Script

The helper script updates Android and iOS tracked config files with environment-provided values.

Example:

node scripts/inject-srcpush-config.js \
  --android-strings android/app/src/main/res/values/strings.xml \
  --ios-plist ios/MyApp/Info.plist \
  --deployment-key-android "$SRCPUSH_DEPLOYMENT_KEY_ANDROID" \
  --deployment-key-ios "$SRCPUSH_DEPLOYMENT_KEY_IOS" \
  --server-url "https://api.srcpush.com" \
  --public-key-file ./keys/public.pem

Required arguments:

  • --android-strings
  • --ios-plist
  • --deployment-key-android
  • --deployment-key-ios

Optional arguments:

  • --server-url
  • --public-key
  • --public-key-file

Release And CI Expectations

The skill prefers explicit scripts for each platform and environment, for example:

  • srcpush:android:staging
  • srcpush:android:prod
  • srcpush:ios:staging
  • srcpush:ios:prod

The corresponding CI flow should:

  1. install dependencies
  2. install the SrcPush CLI
  3. authenticate with an access key from secrets
  4. materialize signing keys only at runtime
  5. run release commands with the correct target binary version

References

  • See SKILL.md for the primary instructions.
  • See references/native-integration.md for file-level integration details.
  • See references/release-and-ci.md for release command and CI patterns.