Skip to content

Instantly share code, notes, and snippets.

@ryparker
Forked from jukben/Fastlane
Created April 13, 2021 20:36
Show Gist options
  • Save ryparker/ec8a91b54713c28c55b4069fa44a0c24 to your computer and use it in GitHub Desktop.
Save ryparker/ec8a91b54713c28c55b4069fa44a0c24 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