semantic-release plugin for updating CMake project releases
Add the following to your .releaserc:
{
...
"plugins": [
...
"@s0cks/cmake-release"
]
}
Download BuildInfo.cmake and place it in your CMake scripts directory:
Ex:
cd /path/to/project
# create scripts directory if it doesn't exist
mkdir cmake/
# download BuildInfo.cmake
wget https://raw.githubusercontent.com/s0cks/cmake-release/main/cmake/BuildInfo.cmake
Add the following to your CMakeLists.txt:
include(BuildInfo)
project(
${BUILD_JSON_NAME}
VERSION ${BUILD_JSON_VERSION}
HOMEPAGE_URL ${BUILD_JSON_HOMEPAGE}
LANGUAGES C CXX)
Finally, create a build.json:
{
"name": "my-project",
"version": "1.0.0",
"homepage": "https://github.com/me/my-project"
}
You can validate your build.json schema against: build.schema.json
Ex:
{
"$schema": "build.schema.json",
...
}
- node & npm
- cmake
# clone the repository
git clone https://github.com/s0cks/cmake-release
# install npm dependencies & link
npm i
npm link
See CHANGELOG.md
See LICENSE
See CONTRIBUTING.md