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 and milyin committed Jun 21, 2024
1 parent 749608e commit e127e1d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,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
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,3 +239,15 @@ Available features can be found in zenoh sources: https://github.com/eclipse-zen
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 e127e1d

Please sign in to comment.