SQLITE_VEC_VERSION_MAJOR SQLITE_VEC_VERSION_MINOR and SQLITE_VEC_VERSION_PATCH in sqlite-vec.h

This commit is contained in:
Alex Garcia 2024-11-19 22:52:27 -08:00
parent 86df498910
commit a12c0d73e6
2 changed files with 8 additions and 0 deletions

View file

@ -153,6 +153,9 @@ sqlite-vec.h: sqlite-vec.h.tmpl VERSION
VERSION=$(shell cat VERSION) \ VERSION=$(shell cat VERSION) \
DATE=$(shell date -r VERSION +'%FT%TZ%z') \ DATE=$(shell date -r VERSION +'%FT%TZ%z') \
SOURCE=$(shell git log -n 1 --pretty=format:%H -- VERSION) \ SOURCE=$(shell git log -n 1 --pretty=format:%H -- VERSION) \
VERSION_MAJOR=$$(echo $$VERSION | cut -d. -f1) \
VERSION_MINOR=$$(echo $$VERSION | cut -d. -f2) \
VERSION_PATCH=$$(echo $$VERSION | cut -d. -f3 | cut -d- -f1) \
envsubst < $< > $@ envsubst < $< > $@
clean: clean:

View file

@ -23,6 +23,11 @@
#define SQLITE_VEC_DATE "${DATE}" #define SQLITE_VEC_DATE "${DATE}"
#define SQLITE_VEC_SOURCE "${SOURCE}" #define SQLITE_VEC_SOURCE "${SOURCE}"
#define SQLITE_VEC_VERSION_MAJOR ${VERSION_MAJOR}
#define SQLITE_VEC_VERSION_MINOR ${VERSION_MINOR}
#define SQLITE_VEC_VERSION_PATCH ${VERSION_PATCH}
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif