How to update format_version in yaml

I added a new project to bitrise and I saw that it has a format_version of 8. I have another project that is set to 4. How do I upgrade from 4 to 8.

Now of course I’m thinking that I should just change the number… but how do I know if it’ll break anything? Shouldn’t there be a button that updates your script from 4 to 8, knowing what would be breaking changes?

Thank you

Hi @coltonidle!

format_version marks the version for the bitrise.yml. The current version is hardcoded in the CLI: https://github.com/bitrise-io/bitrise/blob/master/models/models.go#L23

This is mostly to avoid compatibility issues. We will increment this number each time the model changes. (bitrise.yml format for example)
The CLI (for example an older one) will fail if it finds out the bitrise.yml you want to use has higher format_version than the actual CLI version supports.

So long story short: it shouldn’t really matter what value you have there as long as it’s not higher than the actual version, which is at the time of me typing this 10. We would not recommend manually updating this.

@bitce got it. I will not change it manually.

But just so that I understand. Are you saying that when I update a step to a newer version… that step may require a new format version… and so the format_version number will update itself automagically?

This doesn’t have to do with any step directly, but your .yml and the Bitrise CLI version, and yes, it will be updated automatically if necessary

1 Like

Great. That’s what I was looking for.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.