Skip to content

Instantly share code, notes, and snippets.

@jukben
Created March 29, 2018 12:30
Show Gist options
  • Save jukben/48a3be83d78c8ea941225eb72e9a9bc5 to your computer and use it in GitHub Desktop.
Save jukben/48a3be83d78c8ea941225eb72e9a9bc5 to your computer and use it in GitHub Desktop.
Fastlane – example how to increment versions based on package.json
# ios
match(...)
package = load_json(json_path: "../package.json")
increment_version_number(version_number: package["version"])
increment_build_number(build_number: ENV["CIRCLE_BUILD_NUM"] || 1)
# android
package = load_json(json_path: "../package.json")
gradle(
task: "assembleRelease",
properties: {
'versionName' => package["version"] || "1.1",
'versionCode' => ENV["CIRCLE_BUILD_NUM"] || 1
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment