File tree 3 files changed +6
-11
lines changed
3 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -216,11 +216,6 @@ version numbers in the files.
216
216
- CMakeLists.txt: Update proj_version()
217
217
- docs/source/conf.py: Update version number
218
218
219
- Given the update of the PROJ_VERSION number, the expected MD5SUM of the database
220
- SQL files will be modified. Run a build, and update the PROJ_DB_SQL_EXPECTED_MD5
221
- variable in data/CMakeLists.txt with the value that CMake will provide in an
222
- error message.
223
-
224
219
* Commit changes. Either to master or maintenance branch depending on the nature
225
220
of the release.*
226
221
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ set(ALL_SQL_IN "${CMAKE_CURRENT_BINARY_DIR}/all.sql.in")
45
45
set (PROJ_DB "${CMAKE_CURRENT_BINARY_DIR} /proj.db" )
46
46
include (sql_filelist.cmake)
47
47
48
- set (PROJ_DB_SQL_EXPECTED_MD5 "78cbab972fc752d68dc92e1ecba5240e " )
48
+ set (PROJ_DB_SQL_EXPECTED_MD5 "3d51445a31ba6980332fa8e2348f7b16 " )
49
49
50
50
add_custom_command (
51
51
OUTPUT ${PROJ_DB}
Original file line number Diff line number Diff line change @@ -14,14 +14,14 @@ function(generate_all_sql_in ALL_SQL_IN_FILENAME EXTRA_VALIDATION OUT_MD5)
14
14
cat(${SQL_FILE} "${ALL_SQL_IN_FILENAME} " )
15
15
endforeach ()
16
16
17
- # Compute the MD5 before PROJ_VERSION substitution to avoid updating the
18
- # expected MD5 if we just bump the PROJ_VERSION
19
- configure_file ("${ALL_SQL_IN_FILENAME} " "${ALL_SQL_IN_FILENAME} .tmp" NEWLINE_STYLE UNIX )
20
- file (MD5 "${ALL_SQL_IN_FILENAME} .tmp" OUT_MD5_LOCAL)
17
+ # Compute the MD5 before any records in the metadata table, to avoid
18
+ # refreshing the MD5 if we bump PROJ_VERSION or PROJ_DATA.VERSION
19
+ file (READ ${ALL_SQL_IN_FILENAME} CONTENTS)
20
+ string (REGEX REPLACE "INSERT INTO \\\" metadata\\\" [^\n ]*\n ?" "" CONTENTS_WITHOUT_METADATA "${CONTENTS} " )
21
+ string (MD5 OUT_MD5_LOCAL "${CONTENTS_WITHOUT_METADATA} " )
21
22
set (${OUT_MD5} "${OUT_MD5_LOCAL} " PARENT_SCOPE)
22
23
23
24
# Do ${PROJ_VERSION} substitution
24
- file (READ ${ALL_SQL_IN_FILENAME} CONTENTS)
25
25
string (REPLACE "\$ {PROJ_VERSION}" "${PROJ_VERSION} " CONTENTS_MOD "${CONTENTS} " )
26
26
file (WRITE "${ALL_SQL_IN_FILENAME} " "${CONTENTS_MOD} " )
27
27
endfunction ()
You can’t perform that action at this time.
0 commit comments