mirror of
https://github.com/isar/libmdbx.git
synced 2024-12-28 18:18:49 +08:00
mdbx: use VERSION.txt
instead of VERSION
to avoid collision with #include <version>
.
This commit is contained in:
parent
63e7276c7d
commit
77a1f32e2a
4
.github/workflows/release-assets.yml
vendored
4
.github/workflows/release-assets.yml
vendored
@ -24,8 +24,8 @@ jobs:
|
||||
run: |
|
||||
echo "::set-output name=tarball::$(ls *.tar.gz)"
|
||||
echo "::set-output name=zip::$(ls *.zip)"
|
||||
echo "::set-output name=suffix_unix::$(sed 's|^\([0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}\)\.\(.*\)$|\1|' dist/VERSION)"
|
||||
echo "::set-output name=suffix_dos::$(sed 's|^\([0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}\)\.\(.*\)$|\1|' dist/VERSION | tr . _)"
|
||||
echo "::set-output name=suffix_unix::$(sed 's|^\([0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}\)\.\(.*\)$|\1|' dist/VERSION.txt)"
|
||||
echo "::set-output name=suffix_dos::$(sed 's|^\([0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}\)\.\(.*\)$|\1|' dist/VERSION.txt | tr . _)"
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
|
@ -70,7 +70,7 @@ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git" AND
|
||||
message(SEND_ERROR "Git command-line tool not found")
|
||||
endif()
|
||||
set(MDBX_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src")
|
||||
elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" AND
|
||||
elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/VERSION.txt" AND
|
||||
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/mdbx.c" AND
|
||||
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/mdbx.c++" AND
|
||||
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/config.h.in" AND
|
||||
|
@ -28,6 +28,10 @@ New features:
|
||||
|
||||
- [Allow to predefine/override `MDBX_BUILD_TIMESTAMP` for builds reproducibility](https://github.com/erthink/libmdbx/issues/201).
|
||||
|
||||
Backward compatibility break:
|
||||
|
||||
- Use file `VERSION.txt` for version information instead of `VERSION` to avoid collision with `#include <version>`.
|
||||
|
||||
Fixes:
|
||||
|
||||
- Fixed excess meta-pages checks in case `mdbx_chk` is called to check the DB for a specific meta page and thus could prevent switching to the selected meta page, even if the check passed without errors.
|
||||
|
@ -250,7 +250,7 @@ define uname2titer
|
||||
esac
|
||||
endef
|
||||
|
||||
DIST_EXTRA := LICENSE README.md CMakeLists.txt GNUmakefile Makefile ChangeLog.md VERSION config.h.in ntdll.def \
|
||||
DIST_EXTRA := LICENSE README.md CMakeLists.txt GNUmakefile Makefile ChangeLog.md VERSION.txt config.h.in ntdll.def \
|
||||
$(addprefix man1/, $(MANPAGES)) cmake/compiler.cmake cmake/profile.cmake cmake/utils.cmake
|
||||
DIST_SRC := mdbx.h mdbx.h++ mdbx.c mdbx.c++ $(addsuffix .c, $(TOOLS))
|
||||
|
||||
@ -532,9 +532,9 @@ dist/$(1): $(1)
|
||||
$(QUIET)mkdir -p $$(dir $$@) && sed -e '/^#> dist-cutoff-begin/,/^#< dist-cutoff-end/d' $$< > $$@
|
||||
|
||||
endef
|
||||
$(foreach file,$(filter-out man1/% VERSION %.in ntdll.def,$(DIST_EXTRA)),$(eval $(call dist-extra-rule,$(file))))
|
||||
$(foreach file,$(filter-out man1/% VERSION.txt %.in ntdll.def,$(DIST_EXTRA)),$(eval $(call dist-extra-rule,$(file))))
|
||||
|
||||
dist/VERSION: src/version.c
|
||||
dist/VERSION.txt: src/version.c
|
||||
@echo ' MAKE $@'
|
||||
$(QUIET)mkdir -p dist/ && echo "$(MDBX_GIT_VERSION).$(MDBX_GIT_REVISION)" > $@
|
||||
|
||||
|
@ -173,7 +173,10 @@ macro(fetch_version name source_root_directory parent_scope)
|
||||
set(${name}_GIT_REVISION 0)
|
||||
|
||||
# Try to get version from VERSION file
|
||||
set(version_file "${source_root_directory}/VERSION")
|
||||
set(version_file "${source_root_directory}/VERSION.txt")
|
||||
if(NOT EXISTS "${version_file}")
|
||||
set(version_file "${source_root_directory}/VERSION")
|
||||
endif()
|
||||
if(EXISTS "${version_file}")
|
||||
file(STRINGS "${version_file}" ${name}_VERSION LIMIT_COUNT 1 LIMIT_INPUT 42)
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user