version

Versioning specification based on semver 2.0
git clone https://noulin.net/git/version.git
Log | Files | Refs | README | LICENSE

commit bc3bbcc7886029e6e151ea4bd7465d86597e39b9
parent 4a9da779b2be5d3670f3a8a527b95cbe49341cfa
Author: Remy Noulin <loader2x@gmail.com>
Date:   Tue, 30 Apr 2019 19:41:55 +0200

add isCompiledWithCurrentLisheepyVersion

Diffstat:
Mpackage.yml | 30++++++++++++------------------
Mversion.c | 5+++++
Mversion.h | 3+++
3 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/package.yml b/package.yml @@ -1,13 +1,11 @@ --- name: version - version: 0.0.1 - description: "Versioning based on semver" + version: 0.0.2 + description: Versioning based on semver bin: ./version.c - #cflags: -DA -ggdb -std=gnu11 -fPIC -pipe - #lflags: -lpcre repository: type: git - url: git+https://github.com/RemyNoulin/version.git + url: "git+https://github.com/RemyNoulin/version.git" keywords: - library - versioning @@ -15,19 +13,15 @@ author: Remy license: MIT bugs: - url: https://github.com/RemyNoulin/version/issues - homepage: https://github.com/RemyNoulin/version#readme - #compileHelp: # text displayed when there is a compilation error + url: "https://github.com/RemyNoulin/version/issues" + homepage: "https://github.com/RemyNoulin/version#readme" dependencies: - short: - # Test configuration: + short: "" testBin: ./testVersion.c - testCflags: -ggdb -std=gnu11 -fPIC -pipe -fprofile-arcs -ftest-coverage -Wall -Wextra - testLflags: -lcheck_pic -lrt -lm -lsubunit -fprofile-arcs -ftest-coverage -rdynamic - # Memcheck configuration: + testCflags: "-ggdb -std=gnu11 -fPIC -pipe -fprofile-arcs -ftest-coverage -Wall -Wextra" + testLflags: "-lcheck_pic -lrt -lm -lsubunit -fprofile-arcs -ftest-coverage -rdynamic" memcheckBin: ./memcheckVersion.c - memcheckCmd: valgrind --leak-check=full --show-leak-kinds=all - memcheckCflags: -ggdb -std=gnu11 -fPIC -pipe - memcheckLflags: -rdynamic - #documentationCmd: # command for generating the documentation with spm doc - private: false # true for private package + memcheckCmd: "valgrind --leak-check=full --show-leak-kinds=all" + memcheckCflags: "-ggdb -std=gnu11 -fPIC -pipe" + memcheckLflags: "-rdynamic" + private: false diff --git a/version.c b/version.c @@ -1628,3 +1628,8 @@ local bool fromJsonStrVersion(versiont *self, const char *json) { } // vim: set expandtab ts=2 sw=2: + +bool checkLibsheepyVersionVersion(const char *currentLibsheepyVersion) { + return eqG(currentLibsheepyVersion, LIBSHEEPY_VERSION); +} + diff --git a/version.h b/version.h @@ -224,3 +224,6 @@ versiont* allocVersion(const char *v); /* end class version*/ // vim: set expandtab ts=2 sw=2: + +#define isVersionCompiledWithCurrentLisheepyVersion checkLibsheepyVersionVersion(LIBSHEEPY_VERSION) +bool checkLibsheepyVersionVersion(const char *currentLibsheepyVersion);