icon

Script

Run any custom script you want. The power is in your hands. Use it wisely!

Run any custom script you want as part of your Bitrise build. All you need to do is specifying the script runner
(the default is bash), add the script, and run a build.

You can also read the script from a file.

Configuring the Step

  1. Set the Execute with/runner binary input.

    Either define the path of the executor, or simply just add its name if you know it is available in the PATH, such as ruby or python. It can even be a command, such as go run.

  2. Write your script in the Script content input or specify a script file.

    If you have a script in your repository, you can simply run it from the file, either by calling it in the Script content input
    or, optionally, by specifying the path to it in the Script file path input.

    Be aware that relative paths are relative to the value set in the Working directory input - by default, it is your app's source directory.

Troubleshooting

If the script fails, check the executor first - obviously, a Python script will not work with a bash runner.

Note that in certain cases, the filename or the filepath actually matters. For example, the go run command only accepts .go files.

Useful links

Related Steps

Similar steps

Downloads and Runs a bash script stored on a private GitHub repo.

Step to execute a kotlin script

Found a great GitHub Gist that you'd like to use during your workflow? Just add the raw URL, Bitrise will download it and run it as a bash script!

Install the gems you need, run the script you'd like.