Semantic versioning and settable variables

Buddy supports settable environment variables. This type of variables allows you to shift values between subsequent actions or executions as well as pipelines.

In order to add a settable variable, switch to the Variables tab in your pipeline's details and click the corresponding button. There you can choose the scope (action, pipeline, workspace) and the type (fixed, settable): Adding a new variableAdding a new variable

Let's assume you want to change the value of an action in your pipeline. In this case, you should use the variable in a build action and set its value. For example, the following command will increment the value of the variable by 1 on every execution:

RELEASE_NUMBER=$RELEASE_NUMBER+1
$

Default build commandsDefault build commands

Use Cases

A good example of applying settable variables is using them to auto-increment the version of the application in your Git repository. The following guide will tell you how to create a pipeline that will:

  • automatically raise the patch version (0.0.1) on every push to the repository
  • ask you to select either minor (0.1.0) or major (1.0.0) version on manual execution

Semantic versioning pipeline exampleSemantic versioning pipeline example

Last modified on June 21, 2021

Get Started

Sign up for free and deploy your project in less than 10 minutes.