Skip to content

Commit 8da64c2

Browse files
committed
Auto-update version numbers in CMakeLists.txt
1 parent f2b52c6 commit 8da64c2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/update-version.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,17 @@ jobs:
3131
sed -i "s/^release = \".*\"/release = \"v${VERSION}\"/" docs/conf.py
3232
sed -i "s/^version = \".*\"/version = \"${VERSION}\"/" pyproject.toml
3333
34-
# Update header file
3534
IFS='.' read -ra VER <<< "$VERSION"
3635
MAJOR=${VER[0]}
3736
MINOR=${VER[1]}
3837
PATCH=${VER[2]}
3938
39+
# Update CMakeLists.txt
40+
sed -i "s/set(MSCCLPP_MAJOR \".*\")/set(MSCCLPP_MAJOR \"${MAJOR}\")/" CMakeLists.txt
41+
sed -i "s/set(MSCCLPP_MINOR \".*\")/set(MSCCLPP_MINOR \"${MINOR}\")/" CMakeLists.txt
42+
sed -i "s/set(MSCCLPP_PATCH \".*\")/set(MSCCLPP_PATCH \"${PATCH}\")/" CMakeLists.txt
43+
44+
# Update header files
4045
sed -i "s/#define MSCCLPP_MAJOR .*/#define MSCCLPP_MAJOR ${MAJOR}/" include/mscclpp/core.hpp
4146
sed -i "s/#define MSCCLPP_MINOR .*/#define MSCCLPP_MINOR ${MINOR}/" include/mscclpp/core.hpp
4247
sed -i "s/#define MSCCLPP_PATCH .*/#define MSCCLPP_PATCH ${PATCH}/" include/mscclpp/core.hpp

0 commit comments

Comments
 (0)