Syntax
Arguments
type
The type of version bump. Required.patch- Bug fixes and minor changes (e.g., 1.0.0 → 1.0.1)minor- New features, backward compatible (e.g., 1.0.0 → 1.1.0)major- Breaking changes (e.g., 1.0.0 → 2.0.0)
Examples
Patch release (bug fixes)
1.2.3 to 1.2.4
Minor release (new features)
1.2.3 to 1.3.0
Major release (breaking changes)
1.2.3 to 2.0.0
What it does
- Reads current version: Gets
NATIVEPHP_APP_VERSIONfrom your.envfile - Calculates new version: Increments based on the release type
- Updates .env: Writes the new version to
NATIVEPHP_APP_VERSION - Displays result: Shows the version change
Version format
Versions follow semantic versioning (SemVer):- MAJOR: Incompatible API changes
- MINOR: Backward-compatible functionality
- PATCH: Backward-compatible bug fixes
Environment variable
The command updatesNATIVEPHP_APP_VERSION in your .env file:
Build numbers
Note that version name (e.g., “1.2.3”) is different from version code (build number):- Version name: User-facing version string (
NATIVEPHP_APP_VERSION) - Version code: Integer build number (
NATIVEPHP_APP_VERSION_CODE)
native:check-build-number to manage version codes.
See also
- native:check-build-number - Manage build numbers
- native:package - Package for distribution