Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace -rc with -pre and document versioning #466

Merged
merged 1 commit into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ if(NOT DEFINED PROJECT_VERSION_TWEAK)
elseif(PROJECT_VERSION_TWEAK EQUAL 0)
set(project_version "${project_version}-dev")
elseif(PROJECT_VERSION_TWEAK GREATER 1)
set(project_version "${project_version}-rc.${PROJECT_VERSION_TWEAK}")
set(project_version "${project_version}-pre.${PROJECT_VERSION_TWEAK}")
endif()
status_print(project_version)

Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,3 +260,16 @@ Available features can be found in Zenoh [Cargo.toml](https://github.com/eclipse
```bash
cmake ../zenoh-c -DZENOHC_CARGO_FLAGS="--no-default-features;--features=zenoh/transport_tcp,zenoh/transport_udp"
```

## Versioning

Being a CMake project, zenoh-c is limited to the `MAJOR.MINOR.PATCH.TWEAK` version scheme [inherent
to CMake](https://gitlab.kitware.com/cmake/cmake/-/issues/16716). However, zenoh-c also incorporates
a Cargo package which cannot be versionned with the `MAJOR.MINOR.PATCH.TWEAK` version scheme (not
SemVer compatible). Hence zenoh-c uses a one-to-one mapping between CMake versions and SemVer versions:

| CMake version | SemVer equivalent | Meaning |
|-------------------------|-------------------|----------------------|
| `1.2.3` | `1.2.3` | Release version |
| `1.2.3.0` | `1.2.3-dev` | Developement version |
| `1.2.3.x if x >= 1` | `1.2.3-pre.x` | Pre-release version |