Semantic versioning and settable variables
Settable variables allow you to shift values between subsequent actions or executions as well as pipelines.
Configuration
Success
In Buddy, variables can be defined on four levels: Workspace → Project → Pipeline → Action.
Warning
Each subsequent tier overwrites the value from the higher one.
To pass values through the variable, check the Settable option during configuration:
Adding a new variable
Value incrementation
Let's assume you want to change the value of an action in your pipeline. In this case, you should set the variable's value directly in the build action. Use the following command to increment the value by 1 on every pipeline run:
RELEASE_NUMBER=$RELEASE_NUMBER+1
$
Default build commands
Example use case
A good example of applying settable variables is using them to auto-increment the version of the application in your Git repository. Our guide on semantic versioning will tell you how to create a pipeline which:
- automatically raises the patch version (
0.0.1
) on every push to the repository - asks you to select either minor (
0.1.0
) or major (1.0.0
) version on manual execution
Semantic versioning pipeline example
Last update:
Apr 19, 2024
Apr 19, 2024