Skip to content

Instantly share code, notes, and snippets.

@xotahal
Last active March 19, 2019 03:31
Show Gist options
  • Save xotahal/b424ad51b25125c8f7223ff0c10f9566 to your computer and use it in GitHub Desktop.
Save xotahal/b424ad51b25125c8f7223ff0c10f9566 to your computer and use it in GitHub Desktop.
before_all do |options, params|
build_number =
# highest priority has build_number passes as parameter to the fastlane
params[:build_number] ||
# we use Circle CI - build number is autoincremented on CI
# we can get it from environment
ENV["CIRCLE_BUILD_NUM"] ||
# if you run fastlane localy on your machine it gets build number
# from Circle CI by using their API
get_last_circleci_build_number
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment