This is an automated email from the ASF dual-hosted git repository.
tison pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/incubator-kvrocks.git
The following commit(s) were added to refs/heads/unstable by this push:
new a8bf8cdf refactor: move VERSION to src folder (#1149)
a8bf8cdf is described below
commit a8bf8cdfe169bac563e9b2db8072d1386669b94c
Author: LiuHanCheng <[email protected]>
AuthorDate: Fri Dec 2 12:07:30 2022 +0800
refactor: move VERSION to src folder (#1149)
---
CMakeLists.txt | 2 +-
VERSION => src/VERSION.txt | 0
x.py | 2 +-
3 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 348d7aa3..406306a1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -147,7 +147,7 @@ list(APPEND EXTERNAL_LIBS Threads::Threads)
# Add git sha to version.h
find_package(Git REQUIRED)
-execute_process(COMMAND sh -c "cat VERSION"
+execute_process(COMMAND sh -c "cat src/VERSION.txt"
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE PROJECT_VERSION)
execute_process(COMMAND git rev-parse --short HEAD
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE GIT_SHA)
diff --git a/VERSION b/src/VERSION.txt
similarity index 100%
rename from VERSION
rename to src/VERSION.txt
diff --git a/x.py b/x.py
index 5aecb854..09a69d4c 100755
--- a/x.py
+++ b/x.py
@@ -212,7 +212,7 @@ def write_version(release_version: str) -> str:
if SEMVER_REGEX.match(version) is None:
raise RuntimeError(f"Kvrocks version should follow semver spec, got:
{version}")
- with open('VERSION', 'w+') as f:
+ with open('src/VERSION.txt', 'w+') as f:
f.write(version)
return version