Created
December 14, 2018 08:52
-
-
Save JagCesar/3c895050eb5cce71f7438b942fcc3605 to your computer and use it in GitHub Desktop.
Tag each uploaded beta with version and current build number. It's pretty sweet.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lane :beta do | |
ensure_git_status_clean | |
latestBuildNumber = bump_build_number | |
# Git tag must not already exist. If it does, check if we forgot to bump version or | |
# delete previous tag on remote. | |
git_tag_name = "v#{version}(#{latestBuildNumber})" | |
UI.crash!("Git tag #{git_tag_name} already exists.") if git_tag_exists(tag: git_tag_name) | |
build_app(scheme: "Volante") | |
upload_to_testflight(skip_waiting_for_build_processing: true) | |
# Create a git tag, | |
add_git_tag(tag: git_tag_name) | |
push_git_tags | |
increment_build_number(build_number: 0, xcodeproj: "Volante.xcodeproj") | |
end | |
def bump_build_number | |
latestBuildNumber = latest_testflight_build_number( | |
version: version, | |
initial_build_number: 0 | |
) | |
return increment_build_number( | |
build_number: latestBuildNumber + 1, | |
xcodeproj: "Volante.xcodeproj" | |
) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment