A CLI tool to automatically increment version numbers for React Native projects
- 🤖 Android support: Updates
versionCode
andversionName
inbuild.gradle
- 🍎 iOS support: Updates
CURRENT_PROJECT_VERSION
andMARKETING_VERSION
inproject.pbxproj
- 📁 Multiple file support: Configure multiple Android/iOS files via config file
- 👆🏼 Interactive mode: Professional prompts using Inquirer.js
- ✅ Dry-run mode: Preview changes without making modifications
- 🎛️ Granular control: Update specific version components individually
npm install -g react-native-vbump
npx react-native-vbump
npm install --save-dev react-native-vbump
# Run in any React Native project directory
react-native-vbump
# Or use the short alias
rnvb
# Using npx (no installation required)
npx react-native-vbump
The tool provides an interactive mode with professional prompts:
- Auto-detect your React Native project
- Choose platforms to update (Android, iOS, or both)
- Select increment type (patch, minor, major)
- Confirm changes before applying
The tool works out-of-the-box with standard React Native projects. Optionally, create a vbump.config.js
file in your project root to customize file paths:
export default {
android: {
files: [
'android/app/build.gradle',
'android/library/build.gradle',
// Add more Android modules
]
},
ios: {
files: [
// Auto-detect all .xcodeproj files
'ios/*.xcodeproj/project.pbxproj',
// Or specify explicit paths
'ios/MyApp.xcodeproj/project.pbxproj',
'ios/MyAppExtension.xcodeproj/project.pbxproj'
]
},
packageJson: 'package.json'
};
Supported config file names:
vbump.config.js
vbump.config.json
.vbump.config.js
.vbump.config.json
The tool automatically detects React Native projects by:
- Searching upward from current directory
- Checking package.json for React Native dependencies
- Verifying structure (android/ios directories exist)
- Loading configuration if available
Option | Description |
---|---|
-p, --project-path <path> |
Path to React Native project (auto-detected if not specified) |
-c, --config <path> |
Path to configuration file |
-a, --android |
Update Android versions only |
-i, --ios |
Update iOS versions only |
--build-numbers |
Update only build numbers (both platforms) |
--android-build-number [number] |
Update only Android build number (versionCode) |
--android-app-version [version] |
Update only Android app version (versionName) |
--ios-build-number [number] |
Update only iOS build number (CURRENT_PROJECT_VERSION) |
--ios-app-version [version] |
Update only iOS app version (MARKETING_VERSION) |
--increment <type> |
Increment type: major, minor, patch (default: patch) |
--dry-run |
Preview changes without applying them |
# Interactive mode with auto-detection
npx react-native-vbump
# Update both platforms with patch increment
npx react-native-vbump --android --ios
# Preview changes
npx react-native-vbump --dry-run
# Update only Android build number
npx react-native-vbump --android-build-number
# Update only iOS app version
npx react-native-vbump --ios-app-version "2.1.0"
# Update build numbers for both platforms
npx react-native-vbump --build-numbers
# Update build numbers for automated builds
npx react-native-vbump --build-numbers
# Update with specific version for release
npx react-native-vbump --android --ios --android-app-version "2.1.0" --ios-app-version "2.1.0"
# Use custom config file
npx react-native-vbump --config ./build-configs/version.config.js
# Run from different directory
npx react-native-vbump --project-path ./my-rn-app
- versionCode (Android): Integer build number (e.g., 591 → 592)
- versionName (Android): Semantic version (e.g., "2.12.0" → "2.12.1")
- CURRENT_PROJECT_VERSION (iOS): Integer build number (e.g., 1 → 2)
- MARKETING_VERSION (iOS): Semantic version (e.g., "2.12.0" → "2.12.1")
# Clone repository
git clone https://github.com/junedomingo/react-native-vbump.git
cd react-native-vbump
# Install dependencies
npm install
# Run in development
npm run dev
# Build for production
npm run build
# Run tests
npm test
- Node.js: 20.0.0 or higher
- React Native project with standard structure
- Platform files:
android/app/build.gradle
and/orios/*.xcodeproj/project.pbxproj
Contributions are welcome! Please feel free to submit a Pull Request.