Skip to content

Increment project version to 5.4 #1290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/config.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
PROJECT_VERSION=5.4
JAVA_VERSION=17
JAVA_DISTRIBUTION=temurin
MAVEN_VERSION=3.9.9
Expand Down
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@

cmake_minimum_required(VERSION 3.10)

file(READ "${CMAKE_CURRENT_SOURCE_DIR}/.github/config.env" ENV_FILE_CONTENTS)
string(REGEX REPLACE ".*PROJECT_VERSION=([^\n\r]*).*" "\\1" PROJECT_VERSION "${ENV_FILE_CONTENTS}")
message(STATUS "PROJECT_VERSION = ${PROJECT_VERSION}")
Comment on lines +19 to +21
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not like this reading parsing approach. It is error prone. Our users use it from source code, hence it is important that they can compile locally and in most possible environments. Hence, I do not favor making the version yet another github environment variable. Some of our users may not use github but download source zip and build as well.

We may have hazelcast-cpp-client-examples cmake use it from parent cmake or a common CMakelists.in which can be included in both files.

Another alternative would be passing the version from cmake build command but I would rather not leave the version that flexible and leave it to the users and that is yet an extra parameter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s not GitHub specific, it’s using cmake to parse the existing config file that we also use for GitHub actions. But if you think it’s overengineered, I won’t disagree.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is over engineered. We can always use cmake include file approach if we want to centralize some contents in cmake file. The version used in examples may not be even needed. Let's evaluate alternative solutions if we want to avoid this dupliation. Currently, version is in main CMakeLists.txt file and and cmake file in examples folder.


project(hazelcast-cpp-client
VERSION 5.3
VERSION ${PROJECT_VERSION}
DESCRIPTION "Hazelcast C++ Client"
LANGUAGES CXX)

Expand Down
6 changes: 5 additions & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@

cmake_minimum_required (VERSION 3.10)

file(READ "${CMAKE_CURRENT_SOURCE_DIR}/.github/config.env" ENV_FILE_CONTENTS)
string(REGEX REPLACE ".*PROJECT_VERSION=([^\n\r]*).*" "\\1" PROJECT_VERSION "${ENV_FILE_CONTENTS}")
message(STATUS "PROJECT_VERSION = ${PROJECT_VERSION}")

project (hazelcast-cpp-client-examples
VERSION 5.3
VERSION ${PROJECT_VERSION}
DESCRIPTION "Hazelcast C++ Client Code Examples"
LANGUAGES CXX)

Expand Down
Loading