{"id":29616732,"url":"https://github.com/grohden/react-native-cli-bump-version","last_synced_at":"2025-07-21T01:02:30.049Z","repository":{"id":41358622,"uuid":"246938652","full_name":"Grohden/react-native-cli-bump-version","owner":"Grohden","description":"A simple react native cli plugin to help you with version bumps","archived":false,"fork":false,"pushed_at":"2025-01-10T21:28:30.000Z","size":215,"stargazers_count":39,"open_issues_count":3,"forks_count":12,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-10T22:33:31.337Z","etag":null,"topics":["bumps","cli","plugin","react-native","react-native-cli","react-native-cli-plugin","versioning"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Grohden.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-12T22:03:39.000Z","updated_at":"2025-01-10T21:26:21.000Z","dependencies_parsed_at":"2025-01-10T22:33:38.997Z","dependency_job_id":"9b0a6ef6-8780-42b0-9144-cc45af75a400","html_url":"https://github.com/Grohden/react-native-cli-bump-version","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/Grohden/react-native-cli-bump-version","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Grohden%2Freact-native-cli-bump-version","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Grohden%2Freact-native-cli-bump-version/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Grohden%2Freact-native-cli-bump-version/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Grohden%2Freact-native-cli-bump-version/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Grohden","download_url":"https://codeload.github.com/Grohden/react-native-cli-bump-version/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Grohden%2Freact-native-cli-bump-version/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266222295,"owners_count":23894993,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bumps","cli","plugin","react-native","react-native-cli","react-native-cli-plugin","versioning"],"created_at":"2025-07-21T01:02:23.441Z","updated_at":"2025-07-21T01:02:30.036Z","avatar_url":"https://github.com/Grohden.png","language":"TypeScript","readme":"# react-native-cli-bump-version\n\nA **simple** react-native cli plugin to bump versions at platform files\n\n## Install\n\n`npm i --save-dev react-native-cli-bump-version`\n\n`yarn add -D react-native-cli-bump-version`\n\n## Usage\n\nSince this is a react-native cli plugin, after adding it to the project\nyou can call:\n\n```shell script\nnpx react-native bump-version --type patch\n```\nThat should produce this:\n```shell script\niOS project.pbxproj code: 24 -\u003e 25\nAndroid build.gradle code: 23 -\u003e 24\niOS project.pbxproj version: 1.10.6 -\u003e 1.10.7\nAndroid gradle.build version: 1.10.6 -\u003e 1.10.7\npackage.json: 1.10.6 -\u003e 1.10.7\n```\n\nThe plugin updates and write the output listed files, and it's up to you to\ncommit them.\n\n\nTip: I usually create a script entry for the command, since it tends to be long:\n\n```json\n{\n    \"scripts\": {\n        \"bump\": \"npx react-native bump-version --skip-semver-for android\"\n    }\n}\n```\n\nThat way you can invoke it like: `yarn bump --type patch`\n\n\n## Flags\n\nJust ask for help:\n\n```shell script\nnpx react-native bump-version --help\n\nOptions:\n  --type [major|minor|patch]           SemVer release type, optional if --skip-semver-for all is passed, ignored (and optional) when --semver is passed\n  --skip-semver-for [android|ios|all]  Skips bump SemVer for specified platform\n  --skip-code-for [android|ios|all]    Skips bump version codes for specified platform\n  --semver                             Pass release version if known. Overwrites calculated SemVer. Optional.\n  -h, --help                           output usage information\n```\n\n### Recommendations\n\n#### Use gradle for SemVer sync\nAndroid can handle automatically semantic version sync with `package.json`:\n\n```groovy\nimport groovy.json.JsonSlurper\n\ndef getNpmVersion() {\n    def inputFile = file(\"$rootDir/../package.json\")\n    def jsonPackage = new JsonSlurper().parseText(inputFile.text)\n\n    return jsonPackage[\"version\"]\n}\n\nandroid {\n  ...\n  defaultConfig {\n        applicationId \"com.example\"\n        minSdkVersion rootProject.ext.minSdkVersion\n        targetSdkVersion rootProject.ext.targetSdkVersion\n        versionCode 25\n        versionName getNpmVersion()\n        ...\n    }\n    ...\n}\n```\n\nNote: with this you should pass `--skip-semver-for android`, otherwise the cli\nwill break.\n\n#### Use MARKETING_VERSION in `Info.plist`\n\nI've choosen to remove the `Info.plist` manipulation as it was not needed\nif it uses the `MARKETING_VERSION` env var, so be sure that your project/xcode is updated and that\nthe `Info.plist` file has `MARKETING_VERSION` instead of SemVer string:\n\n```xml\n\t\u003ckey\u003eCFBundleShortVersionString\u003c/key\u003e\n\t\u003cstring\u003e$(MARKETING_VERSION)\u003c/string\u003e\n```\n\n### Mention\n\nI tried to find a tool that did this before starting it:\n \n * [rnbv](https://github.com/llotheo/react-native-bump-version) inspired my initial sources\n * [react-native-version](https://github.com/stovmascript/react-native-version) actually does what I was\n looking for, but I already had written the tool, so I just published it anyway. \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrohden%2Freact-native-cli-bump-version","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrohden%2Freact-native-cli-bump-version","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrohden%2Freact-native-cli-bump-version/lists"}