mirror of
https://github.com/microsoft/mscclpp.git
synced 2026-05-11 17:00:22 +00:00
Auto-update version numbers in CMakeLists.txt (#450)
This commit is contained in:
7
.github/workflows/update-version.yml
vendored
7
.github/workflows/update-version.yml
vendored
@@ -31,12 +31,17 @@ jobs:
|
||||
sed -i "s/^release = \".*\"/release = \"v${VERSION}\"/" docs/conf.py
|
||||
sed -i "s/^version = \".*\"/version = \"${VERSION}\"/" pyproject.toml
|
||||
|
||||
# Update header file
|
||||
IFS='.' read -ra VER <<< "$VERSION"
|
||||
MAJOR=${VER[0]}
|
||||
MINOR=${VER[1]}
|
||||
PATCH=${VER[2]}
|
||||
|
||||
# Update CMakeLists.txt
|
||||
sed -i "s/set(MSCCLPP_MAJOR \".*\")/set(MSCCLPP_MAJOR \"${MAJOR}\")/" CMakeLists.txt
|
||||
sed -i "s/set(MSCCLPP_MINOR \".*\")/set(MSCCLPP_MINOR \"${MINOR}\")/" CMakeLists.txt
|
||||
sed -i "s/set(MSCCLPP_PATCH \".*\")/set(MSCCLPP_PATCH \"${PATCH}\")/" CMakeLists.txt
|
||||
|
||||
# Update header files
|
||||
sed -i "s/#define MSCCLPP_MAJOR .*/#define MSCCLPP_MAJOR ${MAJOR}/" include/mscclpp/core.hpp
|
||||
sed -i "s/#define MSCCLPP_MINOR .*/#define MSCCLPP_MINOR ${MINOR}/" include/mscclpp/core.hpp
|
||||
sed -i "s/#define MSCCLPP_PATCH .*/#define MSCCLPP_PATCH ${PATCH}/" include/mscclpp/core.hpp
|
||||
|
||||
Reference in New Issue
Block a user