conan-io / conan-io/docs

[question] What is the recommanded way for branch versions ?

Open
#3,652 19 comments 1 reaction 1 assignee Claimed by @memsharded View on GitHub
Dominant language
C++
Stars
125
Forks
382
Avg merge
22h 39m
Merged PRs (30d)
21

Description

### What is your question?

My question is regarding Conan 2.0 and branch versioning.
With conan 1.X, we used the channel to distinguish between branches for our versions in our remote.
I read conan documentation and I understand that it is not recommended to use channel anymore.

We implemented `set_version` function in our conanfile which uses `git describe` for setting the version. We also use tags in our repositories for labeling the released versions.
for example: we might have a tag `0.7.1` for that version. (major.minor.patch) and we use the number of commits from `git describe` command and the `build`.
so on a development branch we might have the version `0.7.1.45` (45 commits since the tag).
When developers implement something, they branch out to a side branch, do their work, do several commits, for example 10 commit. On their branch the package version is now `0.7.1.55`
but after the squash and merge to the develop branch the version will be `0.7.1.46`
Which makes it hard for other developer to understand what is the latest version that they want to use.

I though to add the branch name to the build number, for example: `0.7.1.46-the-most-scary-bug-ever`

What do you do at your companies ? how do you get around versioning branches and resolve the version conflicts between the branches ?

Thanks,
Sagi.

### Have you read the CONTRIBUTING guide?

- [X] I've read the CONTRIBUTING guide

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.