Skip to content

Commit 7dcb647

Browse files
committed
Separate release.cmake (stored in git repo), and version.cmake (generated on-the-fly when possible)
1 parent ae28591 commit 7dcb647

5 files changed

+13
-8
lines changed

CMakeLists.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ execute_process(
3535
#
3636
# A bit hacky.
3737
#-------------------------------------------------------------------------------
38-
include(version.cmake REQUIRED)
38+
include(release.cmake REQUIRED)
39+
include(version.cmake)
40+
message("Configuring cmake for davix version: ${VERSION_FULL}")
3941

4042
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/")
4143
option(SHARED_LIBRARY "generate shared library" TRUE)

RELEASE-NOTES.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Prevent genversion.py from getting confused with non-davix git repositories (Thanks to Chris Burr)
77

88
### Improvements
9-
* Include version.cmake in the Git repository, and update during each release to prevent confusing people with cryptic cmake errors. version.cmake will be updated by genversion.py as before, when possible.
9+
* Fix cryptic cmake errors encountered sometimes when building from a tarball.
1010

1111
## 0.7.3 (2019-05-08)
1212
### Bug fixes

dist/new-release.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ function edit_deb_changelog {
5555
sed -i "1i $line1\n$line2\n$line3" packaging/debian/changelog
5656
}
5757

58-
function update_version_cmakefile {
59-
./genversion.py --template version.cmake.in --out version.cmake --custom-version "R_${major}_${minor}_${patch}"
58+
function update_release_cmakefile {
59+
./genversion.py --template version.cmake.in --out release.cmake --custom-version "R_${major}_${minor}_${patch}"
6060
}
6161

6262
function git_commit {
6363
echo "Creating commit.."
6464
git add .
65-
git add --force version.cmake
65+
git add --force release.cmake
6666
git commit -e -m "RELEASE: $major.$minor.$patch"
6767
}
6868

@@ -107,7 +107,7 @@ get_author
107107
edit_rpm_spec
108108
edit_deb_changelog
109109

110-
update_version_cmakefile
110+
update_release_cmakefile
111111
git_commit
112112
git_tag
113113

release.cmake

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
set(VERSION_MAJOR 0)
2+
set(VERSION_MINOR 7)
3+
set(VERSION_PATCH 3)
4+
set(VERSION_MINIPATCH @VERSION_MINIPATCH@)
5+
set(VERSION_FULL 0.7.3)

version.cmake.in

-2
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,3 @@ set(VERSION_MINOR @VERSION_MINOR@)
33
set(VERSION_PATCH @VERSION_PATCH@)
44
set(VERSION_MINIPATCH @VERSION_MINIPATCH@)
55
set(VERSION_FULL @VERSION_FULL@)
6-
7-
message("Configuring cmake for davix version: ${VERSION_FULL}")

0 commit comments

Comments
 (0)