Skip to content

Commit

Permalink
Replace -rc with -pre and document versioning (#466)
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzypixelz authored Jun 19, 2024
1 parent 548ee8d commit f9b4664
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
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 |

0 comments on commit f9b4664

Please sign in to comment.