@hanafe/rn-release
v1.0.5
Published
A CLI tool for React Native project release management
Downloads
13
Maintainers
Readme
@hanafe/rn-release
@hanafe/rn-release is a CLI tool for managing releases of React Native projects. It helps with versioning, building, and deploying your app for both Android and iOS platforms.
This is a basic tool. More functionalities are to be added soon. For contribution contact me at [email protected]
NOTE: A previous version of this same package named rn-hanafe is now deprecated
Features
- Update
package.jsonversion automatically. - Update Android
build.gradleversionName and versionCode. - Update iOS
Info.plistCFBundleShortVersionString and CFBundleVersion. - Build release APKs for Android.
- Build archives for iOS.
- Create Git commits and tags for releases.
- Stream-install APKs to multiple connected Android devices.
Installation
Install the CLI globally using npm:
npm install -g @hanafe/rn-releaseUsage
Run the CLI using the command:
@hanafe/rn-release <command> [options]Commands
release
Prepare and build a new release for your React Native project.
@hanafe/rn-release release [options]Options:
-v, --version <version>: Specify the version type (major,minor,patch) or a specific version (e.g.,1.2.3).-p, --platform <platform>: Specify the platform to build for (android,ios,both). Default isboth.-t, --tag: Create a Git commit and tag for the release. Default istrue.
Example:
@hanafe/rn-release release -v minor -p androidstream-install
Stream-install an APK to multiple connected Android devices via ADB.
@hanafe/rn-release stream-installThis command detects connected Android devices and installs the release APK (android/app/build/outputs/apk/release/app-release.apk) on selected devices.
init
Initialize project settings (functionality to be implemented).
@hanafe/rn-release initInteractive Mode
If no options are provided for the
release
command, the CLI will prompt you for:
- Version type (
major,minor,patch, or custom). - Platform to build for (
android,ios, or both). - Whether to create a Git commit and tag.
Example Workflow
- Navigate to the root of your React Native project.
- Run the
release
command:
@hanafe/rn-release release- Follow the prompts to update the version, build the app, and create a Git tag.
Requirements
- Node.js >= 16.0.0
- For Android builds:
- Android SDK and Gradle installed.
- For iOS builds:
- Xcode and command-line tools installed.
PlistBuddyavailable (comes with macOS).
Troubleshooting
- Ensure you are in the root directory of your React Native project.
- Make sure
package.json
exists in the project root.
- For Android builds, ensure the
android/app/build.gradlefile exists. - For iOS builds, ensure the
iosdirectory contains a valid.xcodeprojor.xcworkspace.
License
This project is licensed under the MIT License.
