Skip to content

Some useful function collection for you if you are using Oh-my-ZSH and Bitrise together!

Notifications You must be signed in to change notification settings

viplezer/oh-my-zsh-bitrise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

bitrise

This plugin adds plus functionality for Bitrise users.

Installation

  • 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

Configuration

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
  • .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

Main Functions

bitrise_open

  • 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

  • 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

  • bitrise_abort build_slug
    • Cancels the given build or returns an error

Helper functions

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.

About

Some useful function collection for you if you are using Oh-my-ZSH and Bitrise together!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages