This project is a fastlane plugin. To get started with fastlane-plugin-get_last_circleci_build_number
, add it to your project by running:
fastlane add_plugin get_last_circleci_build_number
Ensure you have the following enviroment variables set:
CIRCLECI_TOKEN
- your circleci token you can create one by getting a token from circle ciProfile > Personal Api Tokens
CIRCLECI_USER_NAME
- the username which owns the projectCIRCLECI_REPOSITORY
- the name of the repository
You should be able to find your repository name and user name on circleci when you enter into a project the url will be https://app.circleci.com/projects/project-setup/github/dawidvdh/some-project
so in this case dawidvdh
is my username and some-project
is my project.
I typical use it in a project like so:
before_all do |options, params|
Dotenv.overload '.env'
build_number = params[:build_number] || ENV["CIRCLE_BUILD_NUM"] || get_last_circleci_build_number
end
where my .env
contains CIRCLECI_TOKEN
, CIRCLECI_USER_NAME
and CIRCLECI_REPOSITORY
.
Makes user of circleci gem to fetch the last build number from circleci.
For any other issues and feedback about this plugin, please submit it to this repository.
If you have trouble using plugins, check out the Plugins Troubleshooting guide.
For more information about how the fastlane
plugin system works, check out the Plugins documentation.
fastlane is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out fastlane.tools.