mirror of
https://github.com/asg017/sqlite-vec.git
synced 2026-04-26 01:06:27 +02:00
SQLITE_VEC_VERSION_MAJOR SQLITE_VEC_VERSION_MINOR and SQLITE_VEC_VERSION_PATCH in sqlite-vec.h
This commit is contained in:
parent
86df498910
commit
a12c0d73e6
2 changed files with 8 additions and 0 deletions
3
Makefile
3
Makefile
|
|
@ -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:
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue