I’m creating my first bitrise step.
I need a dependency which I declare in the step.yml file under deps.
But If I would like to give the user the option to enter a custom version or ‘latest’ of the dependency?
Is there some best practice to do this?
Or should I just remove it from the deps and install it myself in a shell command that afterwards runs my go command?
Hi @seppe_r,
Nice! We are really happy to hear that you’re working on creating your first step! If the latest version of the deps would be enough and they are available via apt-get and/or brew you can simply add it in the deps section and the CLI will handle everything for you.
For using custom versions of a dependency according to the user’s preferences the solution would be to use a shell command as you mentioned to download and install the desired version of the tool. Let me know if you’d have any further questions!
Best regards,
Tamas
If you declare depsfor a given Step , the Bitrise CLI will check if that tool is installed, and will install it for you if required.
also
This method is the preferred way of handling (step) dependencies, as the Bitrise CLI will not (re)install the specified tool(s) if it’s already available.