This plugin adds plus functionality for Bitrise users.
- Copy the bitrise.plugin.zsh file or clone the content of this repository to $ZSH_CUSTOM/plugins/bitrise on your computer (usually ~/.oh-my-zsh/custom/plugins/bitrise)
- In your .zshrc file add bitrise to the plugins=() section
For using these functions you have to define your Bitrise token and app id. Place 2 files in your filesystem:
- .bitrise_token
- If you are using only one Bitrise token
- you can put the .bitrise_token file into your root directory: ~/.bitrise_token and this token will be used globally for your projects
- or you can use the BITRISE_TOKEN environmental variable to store the token
- If you are using multiple Bitrise tokens for your projects
- you can have a .bitrise_token file on project level
- this option overrides the global token from the ~/.bitrise_token file and the BITRISE_TOKEN environmental variable
- If you are using only one Bitrise token
- .bitrise_appid
- If you only have one Bitrise app
- you can put the .bitrise_appid file into your root directory: ~/.bitrise_appid and every time you issue a command this app id will be used
- or you can use the BITRISE_APPID environmental variable to store the app id
- If you have multiple Bitrise apps
- you can have a .bitrise_appid file on project level
- this option overrides the global appid from the ~/.bitrise_appid file and the BITRISE_APPID environmental variable
- If you only have one Bitrise app
- bitrise_open
- Opens up the Bitrise dashboard
- bitrise open page
- Opens up the given Bitrise page for your app
- Options for page parameter are:
- settings
- workflows
- builds
- add-ons
- team
- code
- If an unknown page is defined the Dashboard opens up
- bitrise_start
- Starts the default workflow for the given app based on the trigger map.
- bitrise_start workflow_id
- Starts a new build for the given app with the specified workflow
- If starting the build succeeds, you get a build url for your build. The last part of this url is your build's slug what can be used to abort the build.
- bitrise_abort build_slug
- Cancels the given build or returns an error
These functions are not using the configuration files, so you can build your own commands or aliases with them:
- _read_bitrise_appid
- Prints the currently used appid
- _read_bitrise_token
- Prints the currently used token
- _bitrise_url app_id page
- Prints an url with the specified page for the given app
- _bitrise_build_start token app_id workflow_id
- Starts a build for the specified app with the given token
- workflow_id is optional, if specified the build will be started with the specified workflow
- If starting the build succeeds, you get a build url for your build. The last part of this url is your build's slug what can be used to abort the build.
- _bitrise_build_abort token app_id build_slug
- Aborts the specified app's build with build_slug slug.