From 5753e4f71c59ccbd926ec73e2bb0f8d1930fd7a4 Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Wed, 2 Mar 2016 13:53:37 +0100 Subject: [PATCH] Switch to new git version number recognition --- .travis.yml | 1 + gitversion/_version_source.py | 486 ------------- gitversion/setup.py | 19 - src/CMakeLists.txt | 1 + src/cryfs-cli/CMakeLists.txt | 3 +- src/cryfs-cli/Cli.cpp | 14 +- src/cryfs/CMakeLists.txt | 3 +- src/cryfs/config/CryConfigCreator.cpp | 4 +- src/cryfs/config/CryConfigLoader.cpp | 4 +- {gitversion => src/gitversion}/.gitattributes | 0 src/gitversion/CMakeLists.txt | 11 + {gitversion => src/gitversion}/MANIFEST.in | 0 .../__pycache__/versioneer.cpython-34.pyc | Bin 0 -> 57311 bytes {gitversion => src/gitversion}/_version.py | 0 {gitversion => src/gitversion}/getversion.py | 0 src/gitversion/gitversion.cmake | 14 + src/gitversion/gitversion.cpp | 32 + src/gitversion/gitversion.h | 15 + src/gitversion/parser.cpp | 79 ++ src/gitversion/parser.h | 30 + {gitversion => src/gitversion}/setup.cfg | 0 src/gitversion/setup.py | 13 + {gitversion => src/gitversion}/versioneer.py | 4 +- src/gitversion/versioneer.pyc | Bin 0 -> 60048 bytes src/gitversion/versionstring.cpp | 11 + src/gitversion/versionstring.h | 11 + test/CMakeLists.txt | 1 + test/gitversion/CMakeLists.txt | 12 + test/gitversion/ParserTest.cpp | 146 ++++ vendor/CMakeLists.txt | 1 - vendor/gitversion/CMakeLists.txt | 1 - vendor/gitversion/gitversion-1.9/.gitignore | 61 -- vendor/gitversion/gitversion-1.9/LICENSE | 675 ------------------ vendor/gitversion/gitversion-1.9/README.md | 163 ----- vendor/gitversion/gitversion-1.9/cmake.cmake | 46 -- .../src/gitversionbuilder/DummyVersion.py | 13 - .../src/gitversionbuilder/__init__.py | 0 .../src/gitversionbuilder/__main__.py | 28 - .../src/gitversionbuilder/main.py | 25 - .../src/gitversionbuilder/utils.py | 38 - .../src/gitversionbuilder/versioninfo.py | 58 -- .../gitversionbuilder/versioninfooutputter.py | 118 --- .../gitversionbuilder/versioninforeader.py | 103 --- vendor/gitversion/gitversion-1.9/src/setup.py | 35 - .../gitversion-1.9/src/test/__init__.py | 0 .../gitversion-1.9/src/test/main_test.py | 237 ------ .../gitversion-1.9/src/test/test_utils.py | 102 --- .../gitversion-1.9/src/test/utils_test.py | 21 - .../src/test/versioninfo_test.py | 194 ----- .../src/test/versioninfooutputter_test.py | 341 --------- .../src/test/versioninforeader_test.py | 286 -------- 51 files changed, 392 insertions(+), 3068 deletions(-) delete mode 100644 gitversion/_version_source.py delete mode 100644 gitversion/setup.py rename {gitversion => src/gitversion}/.gitattributes (100%) create mode 100644 src/gitversion/CMakeLists.txt rename {gitversion => src/gitversion}/MANIFEST.in (100%) create mode 100644 src/gitversion/__pycache__/versioneer.cpython-34.pyc rename {gitversion => src/gitversion}/_version.py (100%) rename {gitversion => src/gitversion}/getversion.py (100%) create mode 100644 src/gitversion/gitversion.cmake create mode 100644 src/gitversion/gitversion.cpp create mode 100644 src/gitversion/gitversion.h create mode 100644 src/gitversion/parser.cpp create mode 100644 src/gitversion/parser.h rename {gitversion => src/gitversion}/setup.cfg (100%) create mode 100644 src/gitversion/setup.py rename {gitversion => src/gitversion}/versioneer.py (99%) create mode 100644 src/gitversion/versioneer.pyc create mode 100644 src/gitversion/versionstring.cpp create mode 100644 src/gitversion/versionstring.h create mode 100644 test/gitversion/CMakeLists.txt create mode 100644 test/gitversion/ParserTest.cpp delete mode 100644 vendor/gitversion/CMakeLists.txt delete mode 100644 vendor/gitversion/gitversion-1.9/.gitignore delete mode 100644 vendor/gitversion/gitversion-1.9/LICENSE delete mode 100644 vendor/gitversion/gitversion-1.9/README.md delete mode 100644 vendor/gitversion/gitversion-1.9/cmake.cmake delete mode 100644 vendor/gitversion/gitversion-1.9/src/gitversionbuilder/DummyVersion.py delete mode 100644 vendor/gitversion/gitversion-1.9/src/gitversionbuilder/__init__.py delete mode 100755 vendor/gitversion/gitversion-1.9/src/gitversionbuilder/__main__.py delete mode 100644 vendor/gitversion/gitversion-1.9/src/gitversionbuilder/main.py delete mode 100644 vendor/gitversion/gitversion-1.9/src/gitversionbuilder/utils.py delete mode 100644 vendor/gitversion/gitversion-1.9/src/gitversionbuilder/versioninfo.py delete mode 100644 vendor/gitversion/gitversion-1.9/src/gitversionbuilder/versioninfooutputter.py delete mode 100644 vendor/gitversion/gitversion-1.9/src/gitversionbuilder/versioninforeader.py delete mode 100644 vendor/gitversion/gitversion-1.9/src/setup.py delete mode 100644 vendor/gitversion/gitversion-1.9/src/test/__init__.py delete mode 100644 vendor/gitversion/gitversion-1.9/src/test/main_test.py delete mode 100644 vendor/gitversion/gitversion-1.9/src/test/test_utils.py delete mode 100644 vendor/gitversion/gitversion-1.9/src/test/utils_test.py delete mode 100644 vendor/gitversion/gitversion-1.9/src/test/versioninfo_test.py delete mode 100644 vendor/gitversion/gitversion-1.9/src/test/versioninfooutputter_test.py delete mode 100644 vendor/gitversion/gitversion-1.9/src/test/versioninforeader_test.py diff --git a/.travis.yml b/.travis.yml index 0c2c617e..14ac3942 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,6 +33,7 @@ install: script: - cmake .. -DBUILD_TESTING=on -DCMAKE_BUILD_TYPE=Debug - make -j$NUMCORES +- ./test/gitversion/gitversion-test - ./test/cpp-utils/cpp-utils-test # TODO Also run on osx once fixed - if [ "${TRAVIS_OS_NAME}" == "linux" ]; then ./run_with_fuse.sh ./test/fspp/fspp-test ; fi diff --git a/gitversion/_version_source.py b/gitversion/_version_source.py deleted file mode 100644 index 4e2ba0f5..00000000 --- a/gitversion/_version_source.py +++ /dev/null @@ -1,486 +0,0 @@ - -# This file helps to compute a version number in source trees obtained from -# git-archive tarball (such as those provided by githubs download-from-tag -# feature). Distribution tarballs (built by setup.py sdist) and build -# directories (produced by setup.py build) will contain a much shorter file -# that just contains the computed version number. - -# This file is released into the public domain. Generated by -# versioneer-0.15+dev (https://github.com/warner/python-versioneer) - -"""Git implementation of _version.py.""" - -import errno -import os -import re -import subprocess -import sys - - -def get_keywords(): - """Get the keywords needed to look up the version information.""" - # these strings will be replaced by git during git-archive. - # setup.py/versioneer.py will grep for the variable names, so they must - # each be defined on a line of their own. _version.py will just call - # get_keywords(). - git_refnames = "$Format:%d$" - git_full = "$Format:%H$" - keywords = {"refnames": git_refnames, "full": git_full} - return keywords - - -class VersioneerConfig: - - """Container for Versioneer configuration parameters.""" - - -def get_config(): - """Create, populate and return the VersioneerConfig() object.""" - # these strings are filled in when 'setup.py versioneer' creates - # _version.py - cfg = VersioneerConfig() - cfg.VCS = "git" - cfg.style = "pep440" - cfg.tag_prefix = "" - cfg.parentdir_prefix = "" - cfg.versionfile_source = "_version_source.py" - cfg.verbose = False - return cfg - - -class NotThisMethod(Exception): - - """Exception raised if a method is not valid for the current scenario.""" - - -LONG_VERSION_PY = {} -HANDLERS = {} - - -def register_vcs_handler(vcs, method): # decorator - """Decorator to mark a method as the handler for a particular VCS.""" - def decorate(f): - """Store f in HANDLERS[vcs][method].""" - if vcs not in HANDLERS: - HANDLERS[vcs] = {} - HANDLERS[vcs][method] = f - return f - return decorate - - -def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False): - """Call the given command(s).""" - assert isinstance(commands, list) - p = None - for c in commands: - try: - dispcmd = str([c] + args) - # remember shell=False, so use git.cmd on windows, not just git - p = subprocess.Popen([c] + args, cwd=cwd, stdout=subprocess.PIPE, - stderr=(subprocess.PIPE if hide_stderr - else None)) - break - except EnvironmentError: - e = sys.exc_info()[1] - if e.errno == errno.ENOENT: - continue - if verbose: - print("unable to run %s" % dispcmd) - print(e) - return None - else: - if verbose: - print("unable to find command, tried %s" % (commands,)) - return None - stdout = p.communicate()[0].strip() - if sys.version_info[0] >= 3: - stdout = stdout.decode() - if p.returncode != 0: - if verbose: - print("unable to run %s (error)" % dispcmd) - return None - return stdout - - -def versions_from_parentdir(parentdir_prefix, root, verbose): - """Try to determine the version from the parent directory name. - - Source tarballs conventionally unpack into a directory that includes - both the project name and a version string. - """ - dirname = os.path.basename(root) - if not dirname.startswith(parentdir_prefix): - if verbose: - print("guessing rootdir is '%s', but '%s' doesn't start with " - "prefix '%s'" % (root, dirname, parentdir_prefix)) - raise NotThisMethod("rootdir doesn't start with parentdir_prefix") - return {"version": dirname[len(parentdir_prefix):], - "full-revisionid": None, - "dirty": False, "error": None} - - -@register_vcs_handler("git", "get_keywords") -def git_get_keywords(versionfile_abs): - """Extract version information from the given file.""" - # the code embedded in _version.py can just fetch the value of these - # keywords. When used from setup.py, we don't want to import _version.py, - # so we do it with a regexp instead. This function is not used from - # _version.py. - keywords = {} - try: - f = open(versionfile_abs, "r") - for line in f.readlines(): - if line.strip().startswith("git_refnames ="): - mo = re.search(r'=\s*"(.*)"', line) - if mo: - keywords["refnames"] = mo.group(1) - if line.strip().startswith("git_full ="): - mo = re.search(r'=\s*"(.*)"', line) - if mo: - keywords["full"] = mo.group(1) - f.close() - except EnvironmentError: - pass - return keywords - - -@register_vcs_handler("git", "keywords") -def git_versions_from_keywords(keywords, tag_prefix, verbose): - """Get version information from git keywords.""" - if not keywords: - raise NotThisMethod("no keywords at all, weird") - refnames = keywords["refnames"].strip() - if refnames.startswith("$Format"): - if verbose: - print("keywords are unexpanded, not using") - raise NotThisMethod("unexpanded keywords, not a git-archive tarball") - refs = set([r.strip() for r in refnames.strip("()").split(",")]) - # starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of - # just "foo-1.0". If we see a "tag: " prefix, prefer those. - TAG = "tag: " - tags = set([r[len(TAG):] for r in refs if r.startswith(TAG)]) - if not tags: - # Either we're using git < 1.8.3, or there really are no tags. We use - # a heuristic: assume all version tags have a digit. The old git %d - # expansion behaves like git log --decorate=short and strips out the - # refs/heads/ and refs/tags/ prefixes that would let us distinguish - # between branches and tags. By ignoring refnames without digits, we - # filter out many common branch names like "release" and - # "stabilization", as well as "HEAD" and "master". - tags = set([r for r in refs if re.search(r'\d', r)]) - if verbose: - print("discarding '%s', no digits" % ",".join(refs-tags)) - if verbose: - print("likely tags: %s" % ",".join(sorted(tags))) - for ref in sorted(tags): - # sorting will prefer e.g. "2.0" over "2.0rc1" - if ref.startswith(tag_prefix): - r = ref[len(tag_prefix):] - if verbose: - print("picking %s" % r) - return {"version": r, - "full-revisionid": keywords["full"].strip(), - "dirty": False, "error": None - } - # no suitable tags, so version is "0+unknown", but full hex is still there - if verbose: - print("no suitable tags, using unknown + full revision id") - return {"version": "0+unknown", - "full-revisionid": keywords["full"].strip(), - "dirty": False, "error": "no suitable tags"} - - -@register_vcs_handler("git", "pieces_from_vcs") -def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command): - """Get version from 'git describe' in the root of the source tree. - - This only gets called if the git-archive 'subst' keywords were *not* - expanded, and _version.py hasn't already been rewritten with a short - version string, meaning we're inside a checked out source tree. - """ - if not os.path.exists(os.path.join(root, ".git")): - if verbose: - print("no .git in %s" % root) - raise NotThisMethod("no .git directory") - - GITS = ["git"] - if sys.platform == "win32": - GITS = ["git.cmd", "git.exe"] - # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty] - # if there isn't one, this yields HEX[-dirty] (no NUM) - describe_out = run_command(GITS, ["describe", "--tags", "--dirty", - "--always", "--long", - "--match", "%s*" % tag_prefix], - cwd=root) - # --long was added in git-1.5.5 - if describe_out is None: - raise NotThisMethod("'git describe' failed") - describe_out = describe_out.strip() - full_out = run_command(GITS, ["rev-parse", "HEAD"], cwd=root) - if full_out is None: - raise NotThisMethod("'git rev-parse' failed") - full_out = full_out.strip() - - pieces = {} - pieces["long"] = full_out - pieces["short"] = full_out[:7] # maybe improved later - pieces["error"] = None - - # parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty] - # TAG might have hyphens. - git_describe = describe_out - - # look for -dirty suffix - dirty = git_describe.endswith("-dirty") - pieces["dirty"] = dirty - if dirty: - git_describe = git_describe[:git_describe.rindex("-dirty")] - - # now we have TAG-NUM-gHEX or HEX - - if "-" in git_describe: - # TAG-NUM-gHEX - mo = re.search(r'^(.+)-(\d+)-g([0-9a-f]+)$', git_describe) - if not mo: - # unparseable. Maybe git-describe is misbehaving? - pieces["error"] = ("unable to parse git-describe output: '%s'" - % describe_out) - return pieces - - # tag - full_tag = mo.group(1) - if not full_tag.startswith(tag_prefix): - if verbose: - fmt = "tag '%s' doesn't start with prefix '%s'" - print(fmt % (full_tag, tag_prefix)) - pieces["error"] = ("tag '%s' doesn't start with prefix '%s'" - % (full_tag, tag_prefix)) - return pieces - pieces["closest-tag"] = full_tag[len(tag_prefix):] - - # distance: number of commits since tag - pieces["distance"] = int(mo.group(2)) - - # commit: short hex revision ID - pieces["short"] = mo.group(3) - - else: - # HEX: no tags - pieces["closest-tag"] = None - count_out = run_command(GITS, ["rev-list", "HEAD", "--count"], - cwd=root) - pieces["distance"] = int(count_out) # total number of commits - - return pieces - - -def plus_or_dot(pieces): - """Return a + if we don't already have one, else return a .""" - if "+" in pieces.get("closest-tag", ""): - return "." - return "+" - - -def render_pep440(pieces): - """Build up version string, with post-release "local version identifier". - - Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you - get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty - - Exceptions: - 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += plus_or_dot(pieces) - rendered += "%d.g%s" % (pieces["distance"], pieces["short"]) - if pieces["dirty"]: - rendered += ".dirty" - else: - # exception #1 - rendered = "0+untagged.%d.g%s" % (pieces["distance"], - pieces["short"]) - if pieces["dirty"]: - rendered += ".dirty" - return rendered - - -def render_pep440_pre(pieces): - """TAG[.post.devDISTANCE] -- No -dirty. - - Exceptions: - 1: no tags. 0.post.devDISTANCE - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"]: - rendered += ".post.dev%d" % pieces["distance"] - else: - # exception #1 - rendered = "0.post.dev%d" % pieces["distance"] - return rendered - - -def render_pep440_post(pieces): - """TAG[.postDISTANCE[.dev0]+gHEX] . - - The ".dev0" means dirty. Note that .dev0 sorts backwards - (a dirty tree will appear "older" than the corresponding clean one), - but you shouldn't be releasing software with -dirty anyways. - - Exceptions: - 1: no tags. 0.postDISTANCE[.dev0] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += ".post%d" % pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - rendered += plus_or_dot(pieces) - rendered += "g%s" % pieces["short"] - else: - # exception #1 - rendered = "0.post%d" % pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - rendered += "+g%s" % pieces["short"] - return rendered - - -def render_pep440_old(pieces): - """TAG[.postDISTANCE[.dev0]] . - - The ".dev0" means dirty. - - Eexceptions: - 1: no tags. 0.postDISTANCE[.dev0] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += ".post%d" % pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - else: - # exception #1 - rendered = "0.post%d" % pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - return rendered - - -def render_git_describe(pieces): - """TAG[-DISTANCE-gHEX][-dirty]. - - Like 'git describe --tags --dirty --always'. - - Exceptions: - 1: no tags. HEX[-dirty] (note: no 'g' prefix) - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"]: - rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) - else: - # exception #1 - rendered = pieces["short"] - if pieces["dirty"]: - rendered += "-dirty" - return rendered - - -def render_git_describe_long(pieces): - """TAG-DISTANCE-gHEX[-dirty]. - - Like 'git describe --tags --dirty --always -long'. - The distance/hash is unconditional. - - Exceptions: - 1: no tags. HEX[-dirty] (note: no 'g' prefix) - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) - else: - # exception #1 - rendered = pieces["short"] - if pieces["dirty"]: - rendered += "-dirty" - return rendered - - -def render(pieces, style): - """Render the given version pieces into the requested style.""" - if pieces["error"]: - return {"version": "unknown", - "full-revisionid": pieces.get("long"), - "dirty": None, - "error": pieces["error"]} - - if not style or style == "default": - style = "pep440" # the default - - if style == "pep440": - rendered = render_pep440(pieces) - elif style == "pep440-pre": - rendered = render_pep440_pre(pieces) - elif style == "pep440-post": - rendered = render_pep440_post(pieces) - elif style == "pep440-old": - rendered = render_pep440_old(pieces) - elif style == "git-describe": - rendered = render_git_describe(pieces) - elif style == "git-describe-long": - rendered = render_git_describe_long(pieces) - else: - raise ValueError("unknown style '%s'" % style) - - return {"version": rendered, "full-revisionid": pieces["long"], - "dirty": pieces["dirty"], "error": None} - - -def get_versions(): - """Get version information or return default if unable to do so.""" - # I am in _version.py, which lives at ROOT/VERSIONFILE_SOURCE. If we have - # __file__, we can work backwards from there to the root. Some - # py2exe/bbfreeze/non-CPython implementations don't do __file__, in which - # case we can only use expanded keywords. - - cfg = get_config() - verbose = cfg.verbose - - try: - return git_versions_from_keywords(get_keywords(), cfg.tag_prefix, - verbose) - except NotThisMethod: - pass - - try: - root = os.path.realpath(__file__) - # versionfile_source is the relative path from the top of the source - # tree (where the .git directory might live) to this file. Invert - # this to find the root from __file__. - for i in cfg.versionfile_source.split('/'): - root = os.path.dirname(root) - except NameError: - return {"version": "0+unknown", "full-revisionid": None, - "dirty": None, - "error": "unable to find root of source tree"} - - try: - pieces = git_pieces_from_vcs(cfg.tag_prefix, root, verbose) - return render(pieces, cfg.style) - except NotThisMethod: - pass - - try: - if cfg.parentdir_prefix: - return versions_from_parentdir(cfg.parentdir_prefix, root, verbose) - except NotThisMethod: - pass - - return {"version": "0+unknown", "full-revisionid": None, - "dirty": None, - "error": "unable to compute version"} diff --git a/gitversion/setup.py b/gitversion/setup.py deleted file mode 100644 index 8d2620b5..00000000 --- a/gitversion/setup.py +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env python - -from setuptools import setup -import versioneer - -setup(name='git-version', - version=versioneer.get_version(), - cmdclass=versioneer.get_cmdclass(), - description='Make git version information (e.g. git tag name, git commit id, ...) available to your C++ or python source files. A simple use case scenario is to output this version information when the application is called with "--version".', - author='Sebastian Messmer', - author_email='messmer@cryfs.org', - license='GPLv3', - packages=['gitversion'], - entry_points = { - 'console_scripts': [ - "git-version = __main__:main" - ] - }, -) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d053f034..c74b4867 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,5 +1,6 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}) +add_subdirectory(gitversion) add_subdirectory(cpp-utils) add_subdirectory(fspp) add_subdirectory(parallelaccessstore) diff --git a/src/cryfs-cli/CMakeLists.txt b/src/cryfs-cli/CMakeLists.txt index 3a32be3d..29026d05 100644 --- a/src/cryfs-cli/CMakeLists.txt +++ b/src/cryfs-cli/CMakeLists.txt @@ -12,10 +12,9 @@ set(SOURCES ) add_library(${PROJECT_NAME} ${SOURCES}) -target_link_libraries(${PROJECT_NAME} PUBLIC cryfs cpp-utils) +target_link_libraries(${PROJECT_NAME} PUBLIC cryfs cpp-utils gitversion) target_enable_style_warnings(${PROJECT_NAME}) target_activate_cpp14(${PROJECT_NAME}) -target_git_version_init(${PROJECT_NAME}) add_executable(${PROJECT_NAME}_bin main.cpp) set_target_properties(${PROJECT_NAME}_bin PROPERTIES OUTPUT_NAME cryfs) diff --git a/src/cryfs-cli/Cli.cpp b/src/cryfs-cli/Cli.cpp index 5a4b4e5d..716975ef 100644 --- a/src/cryfs-cli/Cli.cpp +++ b/src/cryfs-cli/Cli.cpp @@ -17,8 +17,8 @@ #include "program_options/Parser.h" #include -#include #include +#include #include "VersionChecker.h" #include "VersionCompare.h" @@ -78,11 +78,11 @@ namespace cryfs { } void Cli::_showVersion() { - cout << "CryFS Version " << version::VERSION_STRING << endl; - if (version::IS_DEV_VERSION) { - cout << "WARNING! This is a development version based on git commit " << version::GIT_COMMIT_ID << + cout << "CryFS Version " << gitversion::VersionString() << endl; + if (gitversion::IsDevVersion()) { + cout << "WARNING! This is a development version based on git commit " << gitversion::GitCommitId() << ". Please do not use in production!" << endl; - } else if (!version::IS_STABLE_VERSION) { + } else if (!gitversion::IsStableVersion()) { cout << "WARNING! This is an experimental version. Please backup your data frequently!" << endl; } else { //TODO This is even shown for stable version numbers like 0.8 - remove once we reach 1.0 @@ -104,10 +104,10 @@ namespace cryfs { optional newestVersion = versionChecker.newestVersion(); if (newestVersion == none) { cout << "Could not check for updates." << endl; - } else if (VersionCompare::isOlderThan(version::VERSION_STRING, *newestVersion)) { + } else if (VersionCompare::isOlderThan(gitversion::VersionString(), *newestVersion)) { cout << "CryFS " << *newestVersion << " is released. Please update." << endl; } - optional securityWarning = versionChecker.securityWarningFor(version::VERSION_STRING); + optional securityWarning = versionChecker.securityWarningFor(gitversion::VersionString()); if (securityWarning != none) { cout << *securityWarning << endl; } diff --git a/src/cryfs/CMakeLists.txt b/src/cryfs/CMakeLists.txt index 1e3866de..85001df9 100644 --- a/src/cryfs/CMakeLists.txt +++ b/src/cryfs/CMakeLists.txt @@ -44,11 +44,10 @@ set(LIB_SOURCES add_library(${PROJECT_NAME} STATIC ${LIB_SOURCES}) set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME cryfs) -target_link_libraries(${PROJECT_NAME} PRIVATE cpp-utils blockstore blobstore fspp) # TODO Check that dependent projects don't get this linked in +target_link_libraries(${PROJECT_NAME} PRIVATE cpp-utils blockstore blobstore fspp gitversion) # TODO Check that dependent projects don't get this linked in target_add_boost(${PROJECT_NAME} program_options chrono) # TODO Check that dependent projects don't get boost added (use PRIVATE here) target_enable_style_warnings(${PROJECT_NAME}) target_activate_cpp14(${PROJECT_NAME}) -target_git_version_init(${PROJECT_NAME}) #install(TARGETS ${PROJECT_NAME} # DESTINATION lib diff --git a/src/cryfs/config/CryConfigCreator.cpp b/src/cryfs/config/CryConfigCreator.cpp index f6971d44..34fa3041 100644 --- a/src/cryfs/config/CryConfigCreator.cpp +++ b/src/cryfs/config/CryConfigCreator.cpp @@ -1,6 +1,6 @@ #include "CryConfigCreator.h" #include "CryCipher.h" -#include +#include using cpputils::Console; using cpputils::unique_ref; @@ -20,7 +20,7 @@ namespace cryfs { CryConfig CryConfigCreator::create(const optional &cipherFromCommandLine) { CryConfig config; config.SetCipher(_generateCipher(cipherFromCommandLine)); - config.SetVersion(version::VERSION_STRING); + config.SetVersion(gitversion::VersionString()); config.SetBlocksizeBytes(_generateBlocksizeBytes()); config.SetRootBlob(_generateRootBlobKey()); config.SetEncryptionKey(_generateEncKey(config.Cipher())); diff --git a/src/cryfs/config/CryConfigLoader.cpp b/src/cryfs/config/CryConfigLoader.cpp index ae4199f8..6a3fc90b 100644 --- a/src/cryfs/config/CryConfigLoader.cpp +++ b/src/cryfs/config/CryConfigLoader.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include namespace bf = boost::filesystem; using cpputils::unique_ref; @@ -45,7 +45,7 @@ optional CryConfigLoader::_loadConfig(const bf::path &filename) { } void CryConfigLoader::_checkVersion(const CryConfig &config) { - const string allowedVersionPrefix = string() + version::VERSION_COMPONENTS[0] + "." + version::VERSION_COMPONENTS[1] + "."; + const string allowedVersionPrefix = string() + gitversion::MajorVersion() + "." + gitversion::MinorVersion() + "."; if (!boost::starts_with(config.Version(), allowedVersionPrefix)) { throw std::runtime_error(string() + "This filesystem was created with CryFS " + config.Version() + " and is incompatible. Please create a new one with your version of CryFS and migrate your data."); } diff --git a/gitversion/.gitattributes b/src/gitversion/.gitattributes similarity index 100% rename from gitversion/.gitattributes rename to src/gitversion/.gitattributes diff --git a/src/gitversion/CMakeLists.txt b/src/gitversion/CMakeLists.txt new file mode 100644 index 00000000..247aee3d --- /dev/null +++ b/src/gitversion/CMakeLists.txt @@ -0,0 +1,11 @@ +project (gitversion) + +include(gitversion.cmake) +get_git_version(GIT_VERSION) + +add_library(${PROJECT_NAME} STATIC gitversion.cpp versionstring.cpp parser.cpp) +target_link_libraries(${PROJECT_NAME}) +target_compile_definitions(${PROJECT_NAME} PRIVATE GIT_VERSION_STRING="${GIT_VERSION}") +target_add_boost(${PROJECT_NAME}) +target_enable_style_warnings(${PROJECT_NAME}) +target_activate_cpp14(${PROJECT_NAME}) diff --git a/gitversion/MANIFEST.in b/src/gitversion/MANIFEST.in similarity index 100% rename from gitversion/MANIFEST.in rename to src/gitversion/MANIFEST.in diff --git a/src/gitversion/__pycache__/versioneer.cpython-34.pyc b/src/gitversion/__pycache__/versioneer.cpython-34.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8afaa4cf907d0e847e766269ab913ba6e01413d8 GIT binary patch literal 57311 zcmeIbdyrgLe&2U{-e?Toe1Tk&cN@gc41s9?B$r%biQUEGK|&^nSPYgR2Mf(Krh5hr z%ybX#?EyF~Ql*${Y2}oqSbil=qR6)Xh*EN-L~*1@jx9w|;>7+#Nh+zN{fAxUN~*SE z=UMqfTS+OO@9&&*@9mz!gHo)LQyO4;Zr^*Jzw>*a-}&ADWpYn>{MY`w4}K#mMgJr! z{OsZS8~mofG89GiC|cmN6xD~KwNkV`6fF!zrLFyTYdBgPjuwWaYpoZek;X`LryM00 zqf)7)@;n^X!;e~}=tF;FELs=~HOHfc@o+s6Elh;#UD3j>a9xfT%HeunY47WPDSTG?gSdnroQ-BxsW)Yun&#!&Z1P0Agx&x28&%6qKz zAq}^_*Z%K|>ieVbQuv9eejsWbi0TKUw;Gh7!Xfop=fRVz_E{-fcrx;jp0Yr>*u5TR8*g~YpTyg^_T7X#i)KPsvo!OII7P^^{QRd;EAYy(yl8}{Zv$c z#ja`m)u{fOUB3j_z8uwG*B3rL*ys}2yb;yEqR}sWDXPC2)lXXmM)1|B{+3-&NA)w& z0^|5vwD59N|9Z5*IKC0p&)U=DQT>}y{hVFTMvZDzKOfy0ijrR%YV3|~GqMZO;f0e? z<78C7Xb*mIsBt{{jP*JdHTXZP>o?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I1cALwJ>!AZf7%pQvt*d8B zSMhwQ!r#%+N$RRZnR{a#;5%4)eyBWpsFeJ-^t-Ii^@Gx#=cMSO_GHo(dk&$B9FwDv z3wQ7a+4pZ4zx)~7@0ZgWuK8V=i||DRlL8t@NMsI0=d3o5Al$?~OTshrSlcrkLhjj5 zg=dbN%9BVQ1^4W4NU$*=-DD5k-F(g8y!%?je|YX*NjKa1fsG-{?hHrCS4)b7fY*z$ zab2XXtchDJtxqW7+vo z`l}AXU7zcoC!(f_JHV-(;V6#|f;kq5j#^uV0jHe;Q=PKost}ynGHLaqI|(}xs<`8> z2e#?;oPIG?zk9gAaf%k%^vuFU(Am4s3>5NTr)O-lvAehM80m1e`+VVszbtT-IXlvC zXG6MQ!C)y^CGNEacG`wF4}_qclw6fw!PE=wIRLbtcHf-V+X^oE?1hxRpOD^QrW$*@ zLe@GPZlp*;dnUUwfeZLs^zOs%bG(Or^%ifgwb!*t$zN%&t+h$quzI?CFsQQm9N^>z z&*{J-2aOwF6x*hIN~!Vm6M#2ZHr$sXWR{SVX|Kt0V`q4iH!mlR^)?9}m4eK_V!0?j zoQ`jS6x}z954J-Zt$T{MsV~}i?{Em3! zHz_6_sa=+XaKlM>W&Uff8}0{JX8u=)mBTkqZTt_k(wkUZT!(ZP7Y*3B9%Tm4yqb*b zA$H2jChwVT@EB);7i7CH8G$${HhIom2AB2rza)`GVh6pPqv|7lJ*y9sX~Vkuf<8|1 z(c5+51)KzFY1xAf#yeY~NMEBdJE111t#&IJ=h7DJH + +using std::string; +using std::pair; +using std::tuple; +using std::tie; +using std::regex; +using std::smatch; +using std::regex_match; +using boost::optional; +using boost::none; + +namespace gitversion { + + VersionInfo Parser::parse(const string &versionString) { + VersionInfo result; + string versionNumber; + optional versionInfo; + tie(versionNumber, versionInfo) = _splitAtPlusSign(versionString); + tie(result.majorVersion, result.minorVersion, result.versionTag) = _extractMajorMinorTag(versionNumber); + result.isDevVersion = (versionInfo != none); + result.isStableVersion = !result.isDevVersion && (result.versionTag == "" || result.versionTag == "stable"); + if (versionInfo != none) { + result.gitCommitId = _extractGitCommitId(*versionInfo); + } else { + result.gitCommitId = ""; + } + return result; + } + + pair> Parser::_splitAtPlusSign(const string &versionString) { + regex splitRegex("^([^+]+)(\\+([^+]+))?$"); + smatch match; + regex_match(versionString, match, splitRegex); + if(match[0] != versionString) { + throw std::logic_error("First match group should be whole string"); + } + if(match.size() != 4) { + throw std::logic_error("Wrong number of match groups"); + } + if (match[2].matched) { + return std::make_pair(match[1], optional(match[3])); + } else { + return std::make_pair(match[1], none); + } + }; + + tuple Parser::_extractMajorMinorTag(const string &versionNumber) { + regex splitRegex("^([0-9]+)\\.([0-9]+)\\.[0-9\\.]*(-(.*))?$"); + smatch match; + regex_match(versionNumber, match, splitRegex); + if(match[0] != versionNumber) { + throw std::logic_error("First match group should be whole string"); + } + if(match.size() != 5) { + throw std::logic_error("Wrong number of match groups"); + } + if(match[3].matched) { + return std::make_tuple(match[1], match[2], match[4]); + } else { + return std::make_tuple(match[1], match[2], ""); + } + }; + + string Parser::_extractGitCommitId(const string &versionInfo) { + regex extractRegex("^[0-9]+\\.g([0-9a-f]+)(\\..*)?$"); + smatch match; + regex_match(versionInfo, match, extractRegex); + if(match[0] != versionInfo) { + throw std::logic_error("First match group should be whole string"); + } + if(match.size() != 3) { + throw std::logic_error("Wrong number of match groups"); + } + return match[1]; + } + +} \ No newline at end of file diff --git a/src/gitversion/parser.h b/src/gitversion/parser.h new file mode 100644 index 00000000..3cf8e115 --- /dev/null +++ b/src/gitversion/parser.h @@ -0,0 +1,30 @@ +#pragma once +#ifndef GITVERSION_PARSER_H +#define GITVERSION_PARSER_H + +#include +#include +#include + +namespace gitversion { + struct VersionInfo { + bool isDevVersion; + bool isStableVersion; + std::string versionTag; + std::string gitCommitId; + std::string majorVersion; + std::string minorVersion; + }; + + class Parser final { + public: + static VersionInfo parse(const std::string &versionString); + + private: + static std::pair> _splitAtPlusSign(const std::string &versionString); + static std::tuple _extractMajorMinorTag(const std::string &versionNumber); + static std::string _extractGitCommitId(const std::string &versionInfo); + }; +} + +#endif diff --git a/gitversion/setup.cfg b/src/gitversion/setup.cfg similarity index 100% rename from gitversion/setup.cfg rename to src/gitversion/setup.cfg diff --git a/src/gitversion/setup.py b/src/gitversion/setup.py new file mode 100644 index 00000000..dcdae273 --- /dev/null +++ b/src/gitversion/setup.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python + +from setuptools import setup +import versioneer + +setup(name='git-version', + version=versioneer.get_version(), + cmdclass=versioneer.get_cmdclass(), + description='Make git version information (e.g. git tag name, git commit id, ...) available to C++ source files.', + author='Sebastian Messmer', + author_email='messmer@cryfs.org', + license='GPLv3' +) diff --git a/gitversion/versioneer.py b/src/gitversion/versioneer.py similarity index 99% rename from gitversion/versioneer.py rename to src/gitversion/versioneer.py index 0781d5f6..ba9d5f26 100644 --- a/gitversion/versioneer.py +++ b/src/gitversion/versioneer.py @@ -1048,8 +1048,8 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command): expanded, and _version.py hasn't already been rewritten with a short version string, meaning we're inside a checked out source tree. """ - # -- (MESSMER) CHANGED FOLLOWING LINE TO LOOK FOR ../.git instead of .git -- - if not os.path.exists(os.path.join(root, "../.git")): + # -- (MESSMER) CHANGED FOLLOWING LINE TO LOOK FOR ../../.git instead of .git -- + if not os.path.exists(os.path.join(root, "../../.git")): if verbose: print("no .git in %s" % root) raise NotThisMethod("no .git directory") diff --git a/src/gitversion/versioneer.pyc b/src/gitversion/versioneer.pyc new file mode 100644 index 0000000000000000000000000000000000000000..739151e260b62881328bbb6e78900b67308103db GIT binary patch literal 60048 zcmeIbdyrgrcHeh<2Cr!Xd;s7BOLBSHAa;5POamafBo`tiVF8eYLW0;HEWrg9nrU?R z3>ui}9`x-2I4d%hWH;6-DQg{-%T}r+MXJc}q$00Njgb#m1`yGOeL$8WNj+BI+av5AGb%-$?9}+bvn7ye?HmK-I3g`Cd2bd zrBYFOUhdS(ekJ)R{N9yZ-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8M^A{8zgC4PE{w7qjs!a(tKYutm78ol>?#8Wtdy`q5$yp21+3l&s0W9M;3()?4m% zJLcKcqnPf&zOc!`zuVUK`)4j*c>DaqSXJhmrC*FPPN; z%8kkW7aJR6In_*Ra_+s2)my9LqI?CqKi15v@en^%uDmT8N)j(;}EOdvUPfg4TH%cFovxaqxjzOYKSXlxmwkBJ$s~XrrUL zLqseY;+o&*r&V7#^Zupx&M%(*;NsgC-Z9D2Zx_!un;$e?zxl6K_c>i^x_m_!EoakY zc}=?cuW>Pp#f6I(E-zmC*5bm&3zsgPzwEwN^ybo8^5*yS^QXDE@vzW|F6l)>m%pXU zzrqEslO#kSHGfJ!WE06O?JUq~Fq7Hga8Nv7d6&HT{Sfpi)8IHLZm1>0PzEE#Y&(Nz z^KncV2P@B*LE}YE-W{my#Fr@($AMtrcyjt#-tMRD{&0X?CPeP1o|r--+ocp2dZ)Zp zPgiREyJP2G>Z(MQXS+y{vA^>CRCOo1vij8~YNp24zXO)%Y#p8sH%ISZ2-zUE zs1|0R^rsd-Q6h9@t&qfbqODPXu){$UMZ?efT=UOsHji>Cm4J^~1V`ynxGmALi;*Je}&ShU)f29sN}Z#6PI*@khEtlPXi1J=YcJWu9odZ0N*68A2W%-D|_Q`;V zF?4Ya6hPE$ITe zOPbJr=eicJ)ciN})1sMvNq4`j%OBU}Pw4U|b@@}e{ApeOj4r>Ti#V_a(-_HU{(b%Y zhr0aFy8JJ?{I9zF6J5;MD5_#y9Mow3ANrvMLm(U#Fkp8N!7`@3dds7}e)wA~U8b4u zno=H@$6>G9|NOt{13PDq%sl_pPT*sD=8^rsnfxY4AEuu<^h|>|-^(*!nMry6=*%NC uyJrr~JU;X6%u_Q5`R~h5?cDp%&Fq}{BfB2kwTlwXnV0s`w)qKxoc|Yx%gK!Z literal 0 HcmV?d00001 diff --git a/src/gitversion/versionstring.cpp b/src/gitversion/versionstring.cpp new file mode 100644 index 00000000..d7697558 --- /dev/null +++ b/src/gitversion/versionstring.cpp @@ -0,0 +1,11 @@ +#include "versionstring.h" + +using std::string; + +namespace gitversion { + + const string &VersionString() { + static const string VERSION_STRING = GIT_VERSION_STRING; // GIT_VERSION_STRING is set by our CMake file as a macro + return VERSION_STRING; + } +} diff --git a/src/gitversion/versionstring.h b/src/gitversion/versionstring.h new file mode 100644 index 00000000..c703b6f3 --- /dev/null +++ b/src/gitversion/versionstring.h @@ -0,0 +1,11 @@ +#pragma once +#ifndef GITVERSION_VERSIONSTRING_H +#define GITVERSION_VERSIONSTRING_H + +#include + +namespace gitversion { + const std::string &VersionString(); +} + +#endif diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index fab6dc78..e158d836 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,6 +1,7 @@ if (BUILD_TESTING) include_directories(../src) + add_subdirectory(gitversion) add_subdirectory(cpp-utils) add_subdirectory(fspp) add_subdirectory(parallelaccessstore) diff --git a/test/gitversion/CMakeLists.txt b/test/gitversion/CMakeLists.txt new file mode 100644 index 00000000..3d835025 --- /dev/null +++ b/test/gitversion/CMakeLists.txt @@ -0,0 +1,12 @@ +project (gitversion-test) + +set(SOURCES + ParserTest.cpp +) + +add_executable(${PROJECT_NAME} ${SOURCES}) +target_link_libraries(${PROJECT_NAME} googletest gitversion) +add_test(${PROJECT_NAME} ${PROJECT_NAME}) + +target_enable_style_warnings(${PROJECT_NAME}) +target_activate_cpp14(${PROJECT_NAME}) diff --git a/test/gitversion/ParserTest.cpp b/test/gitversion/ParserTest.cpp new file mode 100644 index 00000000..7fa8fe89 --- /dev/null +++ b/test/gitversion/ParserTest.cpp @@ -0,0 +1,146 @@ +#include +#include + +using namespace gitversion; + +TEST(ParserTest, TestReleaseVersion_1) { + VersionInfo info = Parser::parse("0.9.2"); + EXPECT_EQ("0", info.majorVersion); + EXPECT_EQ("9", info.minorVersion); + EXPECT_FALSE( info.isDevVersion); + EXPECT_TRUE( info.isStableVersion); + EXPECT_EQ("", info.gitCommitId); + EXPECT_EQ("", info.versionTag); +} + +TEST(ParserTest, TestReleaseVersion_2) { + VersionInfo info = Parser::parse("1.02.3"); + EXPECT_EQ("1", info.majorVersion); + EXPECT_EQ("02", info.minorVersion); + EXPECT_FALSE( info.isDevVersion); + EXPECT_TRUE( info.isStableVersion); + EXPECT_EQ("", info.gitCommitId); + EXPECT_EQ("", info.versionTag); +} + +TEST(ParserTest, TestReleaseVersion_3) { + VersionInfo info = Parser::parse("01.020.3"); + EXPECT_EQ("01", info.majorVersion); + EXPECT_EQ("020", info.minorVersion); + EXPECT_FALSE( info.isDevVersion); + EXPECT_TRUE( info.isStableVersion); + EXPECT_EQ("", info.gitCommitId); + EXPECT_EQ("", info.versionTag); +} + +TEST(ParserTest, TestDevVersion) { + VersionInfo info = Parser::parse("0.9.0+2.g0123abcdef"); + EXPECT_EQ("0", info.majorVersion); + EXPECT_EQ("9", info.minorVersion); + EXPECT_TRUE( info.isDevVersion); + EXPECT_FALSE( info.isStableVersion); + EXPECT_EQ("0123abcdef", info.gitCommitId); + EXPECT_EQ("", info.versionTag); +} + +TEST(ParserTest, TestDirtyDevVersion) { + VersionInfo info = Parser::parse("0.9.0+20.g0123abcdef.dirty"); + EXPECT_EQ("0", info.majorVersion); + EXPECT_EQ("9", info.minorVersion); + EXPECT_TRUE( info.isDevVersion); + EXPECT_FALSE( info.isStableVersion); + EXPECT_EQ("0123abcdef", info.gitCommitId); + EXPECT_EQ("", info.versionTag); +} + +TEST(ParserTest, TestReleaseVersion_StableTag) { + VersionInfo info = Parser::parse("0.9.2-stable"); + EXPECT_EQ("0", info.majorVersion); + EXPECT_EQ("9", info.minorVersion); + EXPECT_FALSE( info.isDevVersion); + EXPECT_TRUE( info.isStableVersion); + EXPECT_EQ("", info.gitCommitId); + EXPECT_EQ("stable", info.versionTag); +} + +TEST(ParserTest, TestDevVersion_StableTag) { + VersionInfo info = Parser::parse("0.9.0-stable+2.g0123abcdef"); + EXPECT_EQ("0", info.majorVersion); + EXPECT_EQ("9", info.minorVersion); + EXPECT_TRUE( info.isDevVersion); + EXPECT_FALSE( info.isStableVersion); + EXPECT_EQ("0123abcdef", info.gitCommitId); + EXPECT_EQ("stable", info.versionTag); +} + +TEST(ParserTest, TestDirtyDevVersion_StableTag) { + VersionInfo info = Parser::parse("0.9.0-stable+20.g0123abcdef.dirty"); + EXPECT_EQ("0", info.majorVersion); + EXPECT_EQ("9", info.minorVersion); + EXPECT_TRUE( info.isDevVersion); + EXPECT_FALSE( info.isStableVersion); + EXPECT_EQ("0123abcdef", info.gitCommitId); + EXPECT_EQ("stable", info.versionTag); +} + +TEST(ParserTest, TestReleaseVersion_AlphaTag) { + VersionInfo info = Parser::parse("0.9.2-alpha"); + EXPECT_EQ("0", info.majorVersion); + EXPECT_EQ("9", info.minorVersion); + EXPECT_FALSE( info.isDevVersion); + EXPECT_FALSE( info.isStableVersion); + EXPECT_EQ("", info.gitCommitId); + EXPECT_EQ("alpha", info.versionTag); +} + +TEST(ParserTest, TestDevVersion_AlphaTag) { + VersionInfo info = Parser::parse("0.9.0-alpha+2.g0123abcdef"); + EXPECT_EQ("0", info.majorVersion); + EXPECT_EQ("9", info.minorVersion); + EXPECT_TRUE( info.isDevVersion); + EXPECT_FALSE( info.isStableVersion); + EXPECT_EQ("0123abcdef", info.gitCommitId); + EXPECT_EQ("alpha", info.versionTag); +} + +TEST(ParserTest, TestDirtyDevVersion_AlphaTag) { + VersionInfo info = Parser::parse("0.9.0-alpha+20.g0123abcdef.dirty"); + EXPECT_EQ("0", info.majorVersion); + EXPECT_EQ("9", info.minorVersion); + EXPECT_TRUE( info.isDevVersion); + EXPECT_FALSE( info.isStableVersion); + EXPECT_EQ("0123abcdef", info.gitCommitId); + EXPECT_EQ("alpha", info.versionTag); +} + +TEST(ParserTest, TestReleaseVersion_RCTag) { + VersionInfo info = Parser::parse("0.9.2-rc1"); + EXPECT_EQ("0", info.majorVersion); + EXPECT_EQ("9", info.minorVersion); + EXPECT_FALSE( info.isDevVersion); + EXPECT_FALSE( info.isStableVersion); + EXPECT_EQ("", info.gitCommitId); + EXPECT_EQ("rc1", info.versionTag); +} + +TEST(ParserTest, TestDevVersion_RCTag) { + VersionInfo info = Parser::parse("0.9.0-rc1+2.g0123abcdef"); + EXPECT_EQ("0", info.majorVersion); + EXPECT_EQ("9", info.minorVersion); + EXPECT_TRUE( info.isDevVersion); + EXPECT_FALSE( info.isStableVersion); + EXPECT_EQ("0123abcdef", info.gitCommitId); + EXPECT_EQ("rc1", info.versionTag); +} + +TEST(ParserTest, TestDirtyDevVersion_RCTag) { + VersionInfo info = Parser::parse("0.9.0-rc1+20.g0123abcdef.dirty"); + EXPECT_EQ("0", info.majorVersion); + EXPECT_EQ("9", info.minorVersion); + EXPECT_TRUE( info.isDevVersion); + EXPECT_FALSE( info.isStableVersion); + EXPECT_EQ("0123abcdef", info.gitCommitId); + EXPECT_EQ("rc1", info.versionTag); +} + +//TODO Dirty non-dev version \ No newline at end of file diff --git a/vendor/CMakeLists.txt b/vendor/CMakeLists.txt index 3bc0a86f..adc6908a 100644 --- a/vendor/CMakeLists.txt +++ b/vendor/CMakeLists.txt @@ -1,4 +1,3 @@ add_subdirectory(googletest) add_subdirectory(scrypt) add_subdirectory(spdlog) -add_subdirectory(gitversion) \ No newline at end of file diff --git a/vendor/gitversion/CMakeLists.txt b/vendor/gitversion/CMakeLists.txt deleted file mode 100644 index 0ab18ccd..00000000 --- a/vendor/gitversion/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -include(gitversion-1.9/cmake.cmake) diff --git a/vendor/gitversion/gitversion-1.9/.gitignore b/vendor/gitversion/gitversion-1.9/.gitignore deleted file mode 100644 index 5afdf67d..00000000 --- a/vendor/gitversion/gitversion-1.9/.gitignore +++ /dev/null @@ -1,61 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -*.egg-info/ -.installed.cfg -*.egg - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*,cover - -# Translations -*.mo -*.pot - -# Django stuff: -*.log - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -.idea -MANIFEST -Version.py diff --git a/vendor/gitversion/gitversion-1.9/LICENSE b/vendor/gitversion/gitversion-1.9/LICENSE deleted file mode 100644 index 733c0723..00000000 --- a/vendor/gitversion/gitversion-1.9/LICENSE +++ /dev/null @@ -1,675 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - {one line to give the program's name and a brief idea of what it does.} - Copyright (C) {year} {name of author} - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - {project} Copyright (C) {year} {fullname} - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. - diff --git a/vendor/gitversion/gitversion-1.9/README.md b/vendor/gitversion/gitversion-1.9/README.md deleted file mode 100644 index d8180318..00000000 --- a/vendor/gitversion/gitversion-1.9/README.md +++ /dev/null @@ -1,163 +0,0 @@ -# git-version [![Build Status](https://travis-ci.org/smessmer/gitversion.svg?branch=master)](https://travis-ci.org/smessmer/gitversion) -Make git version information (e.g. git tag name, git commit id, ...) available to your source files. -A simple use case scenario is to output this version information when the application is called with "--version". - -This repository contains - - A python script to generate C++ headers or python modules with this version information. You can add the python script to your build process to autogenerate the files on each build. - - A CMake script which can be directly included into a CMake projects. It will then automatically be run on each build and you only have to #include the generated file. - - -Use with cmake (only C++) -================ - -Copy this repository into a subfolder of your project and include the cmake.cmake file in your CMakeLists.txt - - INCLUDE(gitversion/cmake.cmake) - TARGET_GIT_VERSION_INIT(buildtarget) - -Then, you can write in your source file: - - #include - cout << version::VERSION_STRING << endl; - cout << version::IS_STABLE_VERSION << endl; - cout << version::GIT_COMMIT_ID << endl; - cout << version::GIT_COMMITS_SINCE_TAG << endl; - // ... (see below for more variables) - -That's it already. Have fun :) - -Use manually (C++ and Python) -================ - -Install from PyPi ----------------- - -To install the tool: - - pip install git-version - -To generate a version.h file containing C++ version information for the git repository located in myrepositorydir: - - python -m gitversionbuilder --dir myrepositorydir --lang cpp version.h - -Or to generate a module with version information for python: - - python -m gitversionbuilder --dir myrepositorydir --lang python version.py - - -Run script from source tree -------------------------- - -If you don't want to use PyPi, you can run the script directly from the source tree. -Clone this repository and go to the src directory (or alternatively add the src directory to the PYTHONPATH environment variable), then call for example - - python -m gitversionbuilder --dir myrepositorydir --lang cpp version.h - -If you want to build a distribution of the package to use it somewhere else, you can use the standard python [setuptools](https://pythonhosted.org/setuptools/). -A corresponding setup.py is available in the directory. - - -Available Information -================= - -Basic Information ------------------ -The following table shows the basic variables that are always available. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
VERSION_STRING1.0Built from git tag "1.0".
v0.8alphaBuilt from git tag "v0.8alpha".
0.8.dev3+rev4fa254c - Built from 3 commits after git tag "0.8". The current git commit has commit id 4fa254c. -
dev2+rev4fa254cThe repository doesn't have any git tags yet. There are 2 commits since the repository started and the current git commit has commit id 4fa254c.
0.8-modifiedThe suffix "-modified" will be used if there have been modifications since the last commit.
0.8.dev3+rev4fa254c-modified
GIT_TAG_NAMEThe name of the last git tag. If there is no git tag, then this is the name of the git branch.
GIT_COMMITS_SINCE_TAGThe number of git commits since the last git tag. If the repository doesn't have any git tags, then this is the number of git commits since the repository started
GIT_COMMIT_IDThe commit id of the git commit this was built from.
MODIFIED_SINCE_COMMITTrue, if there are uncommitted changes in the git working directory or index since the last commit; i.e. untracked (and not ignored) files, or modified files in the working directory or the index.
IS_DEV_VERSIONTrue, if this is a development version; i.e. there are no tags yet or GIT_COMMITS_SINCE_TAG > 0 or MODIFIED_SINCE_COMMIT.
- -Additional Information ----------------------- - -We will parse the git tag name and provide additional information if you use the following versioning scheme for your git tag names: - - - /^v?[0-9]+(\.[0-9]+)*(-?((alpha|beta|rc|pre|m)[0-9]?|stable|final))?$/ - -In words, we support a set of numeric version components separated by a dot, then optionally a version tag like "alpha", "beta", "beta2", "rc2", "M3", "pre2", "stable", "final". The version tag can optionally be separated with a dash and the version number can optionally be prefixed with "v". -The version tag is matched case insensitive. It is for example also allowed to write "RC" instead of "rc". - -Examples for supported version numbers: - - - 0.8.1 - - v3.0 - - 1.1-alpha - - 1.2alpha - - 1.4.3beta - - 1.4.3beta2 - - 2.0-M2 - - 4-RC2 - - 3.0final - - 2.1-stable - - ... - -If you use a version scheme supported by this, we will provide the following additional information - - - - - - - - - - - - - - - - -
IS_STABLE_VERSIONTrue, if built from a final tag; i.e. IS_DEV_VERSION == false and GIT_COMMITS_SINCE_TAG == 0 and VERSION_TAG in {"", "stable", "final"}
VERSION_COMPONENTSAn array containing the version number split at the dots. That is, git tag "1.02.3alpha" will have VERSION_COMPONENTS=["1","02","3"].
VERSION_TAGThe version tag ("alpha", "beta", "rc4", "M2", "stable", "final", "", ...) that follows after the version number. If the version tag is separated by a dash, the dash is not included.
- - diff --git a/vendor/gitversion/gitversion-1.9/cmake.cmake b/vendor/gitversion/gitversion-1.9/cmake.cmake deleted file mode 100644 index 55ae380d..00000000 --- a/vendor/gitversion/gitversion-1.9/cmake.cmake +++ /dev/null @@ -1,46 +0,0 @@ -set(DIR_OF_GITVERSION_TOOL "${CMAKE_CURRENT_LIST_DIR}" CACHE INTERNAL "DIR_OF_GITVERSION_TOOL") - -function (_CREATE_GIT_VERSION_FILE) - FILE(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/messmer_gitversion") - FILE(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/messmer_gitversion/gitversion") - - SET(ENV{PYTHONPATH} "${DIR_OF_GITVERSION_TOOL}/src") - EXECUTE_PROCESS(COMMAND /usr/bin/env python -m gitversionbuilder --lang cpp --dir "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/messmer_gitversion/gitversion/version.h" - RESULT_VARIABLE result) - IF(NOT ${result} EQUAL 0) - MESSAGE(FATAL_ERROR "Error running messmer/git-version tool. Return code is: ${result}") - ENDIF() -endfunction (_CREATE_GIT_VERSION_FILE) - -function(_SET_GITVERSION_CMAKE_VARIABLE OUTPUT_VARIABLE) - # Load version string and write it to a cmake variable so it can be accessed from cmake. - FILE(READ "${CMAKE_CURRENT_BINARY_DIR}/messmer_gitversion/gitversion/version.h" VERSION_H_FILE_CONTENT) - STRING(REGEX REPLACE ".*VERSION_STRING = \"([^\"]*)\".*" "\\1" VERSION_STRING "${VERSION_H_FILE_CONTENT}") - MESSAGE(STATUS "Version from git: ${VERSION_STRING}") - SET(${OUTPUT_VARIABLE} "${VERSION_STRING}" CACHE INTERNAL "${OUTPUT_VARIABLE}") -endfunction(_SET_GITVERSION_CMAKE_VARIABLE) - -###################################################### -# Add git version information -# Uses: -# TARGET_GIT_VERSION_INIT(buildtarget) -# Then, you can write in your source file: -# #include -# cout << gitversion::VERSION.toString() << endl; -###################################################### -function(TARGET_GIT_VERSION_INIT TARGET) - _CREATE_GIT_VERSION_FILE() - TARGET_INCLUDE_DIRECTORIES(${TARGET} PUBLIC "${CMAKE_CURRENT_BINARY_DIR}/messmer_gitversion") - _SET_GITVERSION_CMAKE_VARIABLE(GITVERSION_VERSION_STRING) -endfunction(TARGET_GIT_VERSION_INIT) - -###################################################### -# Load git version information into a cmake variable -# Uses: -# GET_GIT_VERSION(OUTPUT_VARIABLE) -# MESSAGE(STATUS "The version is ${OUTPUT_VARIABLE}") -###################################################### -function(GET_GIT_VERSION OUTPUT_VARIABLE) - _CREATE_GIT_VERSION_FILE() - _SET_GITVERSION_CMAKE_VARIABLE(${OUTPUT_VARIABLE}) -endfunction(GET_GIT_VERSION OUTPUT_VARIABLE) diff --git a/vendor/gitversion/gitversion-1.9/src/gitversionbuilder/DummyVersion.py b/vendor/gitversion/gitversion-1.9/src/gitversionbuilder/DummyVersion.py deleted file mode 100644 index 07e33a55..00000000 --- a/vendor/gitversion/gitversion-1.9/src/gitversionbuilder/DummyVersion.py +++ /dev/null @@ -1,13 +0,0 @@ - -# --------------------------------------------------- -# This file is autogenerated by git-version-builder. -# DO NOT MODIFY! -# --------------------------------------------------- - -VERSION_STRING = "dummy" -TAG_NAME = "dummy" -COMMITS_SINCE_TAG = 0 -GIT_COMMIT_ID = "dummy" -MODIFIED_SINCE_COMMIT = False -IS_DEV_VERSION = True -IS_STABLE_VERSION = False diff --git a/vendor/gitversion/gitversion-1.9/src/gitversionbuilder/__init__.py b/vendor/gitversion/gitversion-1.9/src/gitversionbuilder/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/gitversion/gitversion-1.9/src/gitversionbuilder/__main__.py b/vendor/gitversion/gitversion-1.9/src/gitversionbuilder/__main__.py deleted file mode 100755 index b34fb968..00000000 --- a/vendor/gitversion/gitversion-1.9/src/gitversionbuilder/__main__.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python - -import argparse -import importlib -from gitversionbuilder import main - - -try: - Version = importlib.import_module(".Version", package="gitversionbuilder") -except ImportError: - Version = importlib.import_module(".DummyVersion", package="gitversionbuilder") - - -def run_main(): - parser = argparse.ArgumentParser(description="Create a source file containing git version information.") - parser.add_argument('--version', action='version', version=Version.VERSION_STRING) - parser.add_argument('--lang', choices=['cpp', 'python'], required=True) - parser.add_argument('--dir', default='.') - parser.add_argument('file') - args = parser.parse_args() - - print("Creating git version information from %s" % args.dir) - - main.create_version_file(git_directory=args.dir, output_file=args.file, lang=args.lang) - - -if __name__ == '__main__': - run_main() diff --git a/vendor/gitversion/gitversion-1.9/src/gitversionbuilder/main.py b/vendor/gitversion/gitversion-1.9/src/gitversionbuilder/main.py deleted file mode 100644 index a7dfa6dd..00000000 --- a/vendor/gitversion/gitversion-1.9/src/gitversionbuilder/main.py +++ /dev/null @@ -1,25 +0,0 @@ -from gitversionbuilder import versioninforeader, versioninfooutputter - - -def get_version(git_directory): - return versioninforeader.from_git(git_directory) - - -def create_version_file(git_directory, output_file, lang): - version_info = get_version(git_directory) - output = _output(version_info, lang=lang) - _write_to_file(output_file, output) - - -def _output(version_info, lang): - if lang == "cpp": - return versioninfooutputter.to_cpp(version_info) - elif lang == "python": - return versioninfooutputter.to_python(version_info) - else: - raise ValueError("Unknown language") - - -def _write_to_file(output_file, output): - with open(output_file, 'w') as file: - file.write(output) diff --git a/vendor/gitversion/gitversion-1.9/src/gitversionbuilder/utils.py b/vendor/gitversion/gitversion-1.9/src/gitversionbuilder/utils.py deleted file mode 100644 index 73dc27d3..00000000 --- a/vendor/gitversion/gitversion-1.9/src/gitversionbuilder/utils.py +++ /dev/null @@ -1,38 +0,0 @@ -import os -import sys - -# Use this like -# > with ChDir(my_dir): -# > do_something() -# Then, the working directory will be set to my_dir, do_something() will be called, -# and the working directory will be set back. -class ChDir(object): - def __init__(self, dir): - self.dir = dir - - def __enter__(self): - self.old_dir = os.getcwd() - os.chdir(self.dir) - - def __exit__(self, type, value, traceback): - os.chdir(self.old_dir) - - -class EqualityMixin(object): - def __eq__(self, other): - return (isinstance(other, self.__class__) - and self.__dict__ == other.__dict__) - - def __ne__(self, other): - return not self.__eq__(other) - - -IS_PYTHON_2 = sys.version_info[0] == 2 -IS_PYTHON_3 = sys.version_info[0] == 3 - - -def isstring(obj): - if IS_PYTHON_2: - return isinstance(obj, basestring) - else: - return isinstance(obj, str) diff --git a/vendor/gitversion/gitversion-1.9/src/gitversionbuilder/versioninfo.py b/vendor/gitversion/gitversion-1.9/src/gitversionbuilder/versioninfo.py deleted file mode 100644 index a551b74b..00000000 --- a/vendor/gitversion/gitversion-1.9/src/gitversionbuilder/versioninfo.py +++ /dev/null @@ -1,58 +0,0 @@ -from gitversionbuilder.utils import EqualityMixin, isstring -import re - - -class TagInterpretation(EqualityMixin): - def __init__(self, version_components, version_tag, is_dev_version): - assert (isinstance(version_components, list)) - assert (all(isstring(item) for item in version_components)) - assert (isstring(version_tag)) - self.version_components = version_components - self.version_tag = version_tag - self.is_stable = (not is_dev_version) and self.version_tag in ["", "stable", "final"] - - def __repr__(self): - return "%s(%r)" % (self.__class__, self.__dict__) - - -class VersionInfo(EqualityMixin): - def __init__(self, git_tag_name, git_commits_since_tag, git_commit_id, git_tag_exists, modified_since_commit): - assert (isstring(git_tag_name)) - assert (isinstance(git_commits_since_tag, int)) - assert (isstring(git_commit_id)) - assert (isinstance(git_tag_exists, bool)) - assert (isinstance(modified_since_commit, bool)) - self.git_tag_name = git_tag_name - self.git_commits_since_tag = git_commits_since_tag - self.git_commit_id = git_commit_id - self.git_tag_exists = git_tag_exists - self.modified_since_commit = modified_since_commit - self.is_dev = modified_since_commit or (not git_tag_exists) or (git_commits_since_tag != 0) - - def interpret_tag_name(self): - matched = re.match("^v?([0-9]+(?:\.[0-9]+)*)(?:-?((alpha|beta|rc|pre|m)[0-9]?|stable|final))?$", - self.git_tag_name, re.IGNORECASE) - if matched: - version_components = matched.group(1).split('.') - version_tag = matched.group(2) - if version_tag is None: - version_tag = "" - return TagInterpretation(version_components, version_tag, self.is_dev) - else: - return None - - @property - def version_string(self): - result = "" - if self.git_tag_exists: - result += self.git_tag_name - if self.git_commits_since_tag > 0: - if result != "": - result += "." - result += "dev%d+rev%s" % (self.git_commits_since_tag, self.git_commit_id) - if self.modified_since_commit: - result += "-modified" - return result - - def __repr__(self): - return "%s(%r)" % (self.__class__, self.__dict__) diff --git a/vendor/gitversion/gitversion-1.9/src/gitversionbuilder/versioninfooutputter.py b/vendor/gitversion/gitversion-1.9/src/gitversionbuilder/versioninfooutputter.py deleted file mode 100644 index c8ccf4f0..00000000 --- a/vendor/gitversion/gitversion-1.9/src/gitversionbuilder/versioninfooutputter.py +++ /dev/null @@ -1,118 +0,0 @@ - - -def to_cpp(version_info): - return _CppFormatter().format(version_info) - - -def to_python(version_info): - return _PythonFormatter().format(version_info) - - -class _Formatter(object): - def __init__(self): - pass - - def format(self, version_info): - return self.main_formatter(version_info, - self._format_is_stable(version_info) + self._format_tag_interpretation(version_info)) - - def _format_is_stable(self, version_info): - if not version_info.git_tag_exists: - return self.is_stable_formatter(False) - else: - tag_interpretation = version_info.interpret_tag_name() - if tag_interpretation is not None: - return self.is_stable_formatter(tag_interpretation.is_stable) - else: - return "" - - def _format_tag_interpretation(self, version_info): - tag_interpretation = version_info.interpret_tag_name() - if tag_interpretation is None: - return "" - else: - formatted_version_components = self.version_components_formatter(tag_interpretation.version_components) - return self.tag_interpretation_formatter(tag_interpretation, formatted_version_components) - - -# ---------------------------------------- -# C++ Formatter -# ---------------------------------------- - -class _CppFormatter(_Formatter): - def main_formatter(self, version_info, other_variables): - return """ -// --------------------------------------------------- -// This file is autogenerated by git-version. -// DO NOT MODIFY! -// --------------------------------------------------- - -#pragma once -#ifndef MESSMER_GITVERSION_VERSION_H -#define MESSMER_GITVERSION_VERSION_H - -namespace version { - constexpr const char *VERSION_STRING = "%s"; - constexpr const char *GIT_TAG_NAME = "%s"; - constexpr const unsigned int GIT_COMMITS_SINCE_TAG = %d; - constexpr const char *GIT_COMMIT_ID = "%s"; - constexpr bool MODIFIED_SINCE_COMMIT = %s; - constexpr bool IS_DEV_VERSION = %s; -%s -} - -#endif -""" % (version_info.version_string, version_info.git_tag_name, version_info.git_commits_since_tag, - version_info.git_commit_id, str(version_info.modified_since_commit).lower(), str(version_info.is_dev).lower(), - other_variables) - - def is_stable_formatter(self, is_stable): - return """ - constexpr bool IS_STABLE_VERSION = %s; -""" % str(is_stable).lower() - - def tag_interpretation_formatter(self, tag_interpretation, version_components): - return """ - constexpr const char *VERSION_COMPONENTS[] = %s; - constexpr const char *VERSION_TAG = "%s"; -""" % (version_components, tag_interpretation.version_tag) - - def version_components_formatter(self, version_components): - return "{\"" + "\", \"".join(version_components) + "\"}" - - -# ---------------------------------------- -# Python Formatter -# ---------------------------------------- - -class _PythonFormatter(_Formatter): - def main_formatter(self, version_info, other_variables): - return """ -# --------------------------------------------------- -# This file is autogenerated by git-version. -# DO NOT MODIFY! -# --------------------------------------------------- - -VERSION_STRING = "%s" -GIT_TAG_NAME = "%s" -GIT_COMMITS_SINCE_TAG = %d -GIT_COMMIT_ID = "%s" -MODIFIED_SINCE_COMMIT = %s -IS_DEV_VERSION = %s -%s -""" % (version_info.version_string, version_info.git_tag_name, version_info.git_commits_since_tag, - version_info.git_commit_id, version_info.modified_since_commit, version_info.is_dev, other_variables) - - def is_stable_formatter(self, is_stable): - return """ -IS_STABLE_VERSION = %s -""" % is_stable - - def tag_interpretation_formatter(self, tag_interpretation, version_components): - return """ -VERSION_COMPONENTS = %s -VERSION_TAG = "%s" -""" % (version_components, tag_interpretation.version_tag) - - def version_components_formatter(self, version_components): - return "[\"" + "\", \"".join(version_components) + "\"]" diff --git a/vendor/gitversion/gitversion-1.9/src/gitversionbuilder/versioninforeader.py b/vendor/gitversion/gitversion-1.9/src/gitversionbuilder/versioninforeader.py deleted file mode 100644 index 434195e1..00000000 --- a/vendor/gitversion/gitversion-1.9/src/gitversionbuilder/versioninforeader.py +++ /dev/null @@ -1,103 +0,0 @@ -import subprocess -import os -import re -from gitversionbuilder import versioninfo, utils -from gitversionbuilder.utils import isstring - - -def from_git(git_directory): - with utils.ChDir(git_directory): - try: - with open(os.devnull, 'w') as devnull: - version_string = subprocess.check_output(["git", "describe", "--tags", "--long", "--abbrev=7"], - stderr=devnull).decode() - return _parse_git_version(version_string, _is_modified_since_commit_in_cwd()) - except subprocess.CalledProcessError: - # If there is no git tag, then the commits_since_tag returned by git is wrong - # (because they consider the branch HEAD the tag and there are 0 commits since the branch head). - # We want to return the total number of commits in the branch if there is no tag. - total_num_commits = _total_number_of_commits_in_cwd() - if total_num_commits > 0: - # There is no git tag, but there are commits - branch_name = _branch_name_in_cwd() - commit_id = _commit_id_in_cwd() - return versioninfo.VersionInfo(git_tag_name=branch_name, - git_commits_since_tag=total_num_commits, - git_commit_id=commit_id, - git_tag_exists=False, - modified_since_commit=_is_modified_since_commit_in_cwd()) - else: - # There are no commits yet - branch_name = "HEAD" - commit_id = "0" - return versioninfo.VersionInfo(git_tag_name=branch_name, - git_commits_since_tag=total_num_commits, - git_commit_id=commit_id, - git_tag_exists=False, - modified_since_commit=_cwd_is_not_empty()) - - -def _total_number_of_commits_in_cwd(): - try: - with open('/dev/null', 'w') as devnull: - return int(subprocess.check_output(["git", "rev-list", "HEAD", "--count"], stderr=devnull)) - except subprocess.CalledProcessError: - return 0 - - -def _branch_name_in_cwd(): - return subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"]).strip().decode() - - -def _commit_id_in_cwd(): - return subprocess.check_output(["git", "log", "--format=%h", "-n", "1"]).strip().decode() - - -def _is_modified_since_commit_in_cwd(): - return _there_are_modified_files_in_cwd() or _there_are_untracked_files_in_cwd() - - -def _there_are_untracked_files_in_cwd(): - return subprocess.check_output(["git", "ls-files", "--exclude-standard", "--others"]).strip().decode() != "" - - -def _there_are_modified_files_in_cwd(): - # Usually we'd like to use "git diff-index" here. - # But there seems to be a bug that when we run "chmod 755 file" on a file that already has 755 and is committed to git as such, the next run of "git diff-index" will show it as a difference. - # "git diff" seams to work - return (0 != subprocess.call(["git", "diff", "--exit-code", "--quiet", "HEAD"])) or (0 != subprocess.call(["git", "diff", "--cached", "--exit-code", "--quiet", "HEAD"])) - - -def _cwd_is_not_empty(): - all_entries = os.listdir(os.getcwd()) - nongit_entries = [entry for entry in all_entries if entry != ".git"] - return len(nongit_entries) != 0 - - -def _remove_prefix(prefix, string): - if string.startswith(prefix): - return string[len(prefix):] - else: - return string - - -class VersionParseError(Exception): - def __init__(self, version_string): - self.version_string = version_string - - def __str__(self): - return "Version not parseable: %s" % self.version_string - - -def _parse_git_version(git_version_string, modified_since_commit): - assert(isstring(git_version_string)) - matched = re.match("^([a-zA-Z0-9\.\-/]+)-([0-9]+)-g([0-9a-f]+)$", git_version_string) - if matched: - tag = matched.group(1) - commits_since_tag = int(matched.group(2)) - commit_id = matched.group(3) - return versioninfo.VersionInfo(git_tag_name=tag, git_commits_since_tag=commits_since_tag, - git_commit_id=commit_id, git_tag_exists=True, - modified_since_commit=modified_since_commit) - else: - raise VersionParseError(git_version_string) diff --git a/vendor/gitversion/gitversion-1.9/src/setup.py b/vendor/gitversion/gitversion-1.9/src/setup.py deleted file mode 100644 index 1c382854..00000000 --- a/vendor/gitversion/gitversion-1.9/src/setup.py +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env python - -from setuptools import setup -from gitversionbuilder import main - -main.create_version_file(git_directory=".", output_file="gitversionbuilder/Version.py", lang="python") -version = main.get_version(git_directory=".") - -setup(name='git-version', - version=version.version_string, - description='Make git version information (e.g. git tag name, git commit id, ...) available to your C++ or python source files. A simple use case scenario is to output this version information when the application is called with "--version".', - author='Sebastian Messmer', - author_email='heinzisoft@web.de', - license='GPLv3', - url='https://github.com/smessmer/gitversion', - packages=['gitversionbuilder'], - tests_require=['tempdir'], - test_suite='test', - entry_points = { - 'console_scripts': [ - "git-version = gitversionbuilder.__main__:run_main" - ] - }, - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Intended Audience :: Developers", - "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", - "Programming Language :: Python", - "Programming Language :: C++", - "Topic :: Software Development :: Build Tools", - "Topic :: Software Development :: Code Generators", - "Topic :: Software Development :: Version Control" - ] - ) diff --git a/vendor/gitversion/gitversion-1.9/src/test/__init__.py b/vendor/gitversion/gitversion-1.9/src/test/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/gitversion/gitversion-1.9/src/test/main_test.py b/vendor/gitversion/gitversion-1.9/src/test/main_test.py deleted file mode 100644 index 221c3997..00000000 --- a/vendor/gitversion/gitversion-1.9/src/test/main_test.py +++ /dev/null @@ -1,237 +0,0 @@ -import unittest -import subprocess -import os -import sys -from gitversionbuilder import main, Version -from gitversionbuilder.utils import ChDir -from test import test_utils -from test.test_utils import GitDir, TempFile - - -class IntegrationTest(unittest.TestCase, test_utils.CodeAsserts): - def test_call_version(self): - result = subprocess.check_output([sys.executable, "-m", "gitversionbuilder", "--version"], stderr=subprocess.STDOUT).strip().decode() - self.assertEqual(Version.VERSION_STRING, result) - - def test_call_help(self): - result = subprocess.check_output([sys.executable, "-m", "gitversionbuilder", "--help"], stderr=subprocess.STDOUT).decode() - self.assertRegexpMatches(result, "usage:") - - def test_call_python(self): - with GitDir() as git, TempFile() as out_file: - commit_id = git.create_git_commit() - expected = """ - # --------------------------------------------------- - # This file is autogenerated by git-version. - # DO NOT MODIFY! - # --------------------------------------------------- - - VERSION_STRING = "dev1+rev%s" - GIT_TAG_NAME = "master" - GIT_COMMITS_SINCE_TAG = 1 - GIT_COMMIT_ID = "%s" - MODIFIED_SINCE_COMMIT = False - IS_DEV_VERSION = True - IS_STABLE_VERSION = False - """ % (commit_id[0:7], commit_id[0:7]) - with open("/dev/null", 'w') as devnull: - subprocess.check_call([sys.executable, "-m", "gitversionbuilder", "--lang", "python", "--dir", git.dir, out_file], - stdout=devnull) - self.assertCodeEqual(expected, self.read_file(out_file)) - - def test_call_cpp(self): - with GitDir() as git, TempFile() as out_file: - commit_id = git.create_git_commit() - expected = """ - // --------------------------------------------------- - // This file is autogenerated by git-version. - // DO NOT MODIFY! - // --------------------------------------------------- - - #pragma once - #ifndef MESSMER_GITVERSION_VERSION_H - #define MESSMER_GITVERSION_VERSION_H - - namespace version { - constexpr const char *VERSION_STRING = "dev1+rev%s"; - constexpr const char *GIT_TAG_NAME = "master"; - constexpr const unsigned int GIT_COMMITS_SINCE_TAG = 1; - constexpr const char *GIT_COMMIT_ID = "%s"; - constexpr bool MODIFIED_SINCE_COMMIT = false; - constexpr bool IS_DEV_VERSION = true; - constexpr bool IS_STABLE_VERSION = false; - } - - #endif - """ % (commit_id[0:7], commit_id[0:7]) - with open("/dev/null", 'w') as devnull: - subprocess.check_call([sys.executable, "-m", "gitversionbuilder", "--lang", "cpp", "--dir", git.dir, out_file], - stdout=devnull) - self.assertCodeEqual(expected, self.read_file(out_file)) - - def test_call_without_specifying_dir(self): - with GitDir() as git, TempFile() as out_file: - commit_id = git.create_git_commit() - expected = """ - # --------------------------------------------------- - # This file is autogenerated by git-version. - # DO NOT MODIFY! - # --------------------------------------------------- - - VERSION_STRING = "dev1+rev%s" - GIT_TAG_NAME = "master" - GIT_COMMITS_SINCE_TAG = 1 - GIT_COMMIT_ID = "%s" - MODIFIED_SINCE_COMMIT = False - IS_DEV_VERSION = True - IS_STABLE_VERSION = False - """ % (commit_id[0:7], commit_id[0:7]) - script_dir = os.getcwd() - with ChDir(git.dir), open("/dev/null", 'w') as devnull: - subprocess.check_call([sys.executable, "-m", "gitversionbuilder", "--lang", "python", out_file], - stdout=devnull, env={"PYTHONPATH": script_dir}) - self.assertCodeEqual(expected, self.read_file(out_file)) - - -class MainTest(unittest.TestCase, test_utils.CodeAsserts): - def test_empty_git_python(self): - with GitDir() as git, TempFile() as out_file: - commit_id = git.create_git_commit() - expected = """ - # --------------------------------------------------- - # This file is autogenerated by git-version. - # DO NOT MODIFY! - # --------------------------------------------------- - - VERSION_STRING = "dev1+rev%s" - GIT_TAG_NAME = "master" - GIT_COMMITS_SINCE_TAG = 1 - GIT_COMMIT_ID = "%s" - MODIFIED_SINCE_COMMIT = False - IS_DEV_VERSION = True - IS_STABLE_VERSION = False - """ % (commit_id[0:7], commit_id[0:7]) - main.create_version_file(git_directory=git.dir, output_file=out_file, lang="python") - self.assertCodeEqual(expected, self.read_file(out_file)) - - def test_empty_git_cpp(self): - with GitDir() as git, TempFile() as out_file: - commit_id = git.create_git_commit() - expected = """ - // --------------------------------------------------- - // This file is autogenerated by git-version. - // DO NOT MODIFY! - // --------------------------------------------------- - - #pragma once - #ifndef MESSMER_GITVERSION_VERSION_H - #define MESSMER_GITVERSION_VERSION_H - - namespace version { - constexpr const char *VERSION_STRING = "dev1+rev%s"; - constexpr const char *GIT_TAG_NAME = "master"; - constexpr const unsigned int GIT_COMMITS_SINCE_TAG = 1; - constexpr const char *GIT_COMMIT_ID = "%s"; - constexpr bool MODIFIED_SINCE_COMMIT = false; - constexpr bool IS_DEV_VERSION = true; - constexpr bool IS_STABLE_VERSION = false; - } - - #endif - """ % (commit_id[0:7], commit_id[0:7]) - main.create_version_file(git_directory=git.dir, output_file=out_file, lang="cpp") - self.assertCodeEqual(expected, self.read_file(out_file)) - - def test_tagged_git(self): - with GitDir() as git, TempFile() as out_file: - commit_id = git.create_git_commit() - git.create_git_tag("1.0.1") - expected = """ - # --------------------------------------------------- - # This file is autogenerated by git-version. - # DO NOT MODIFY! - # --------------------------------------------------- - - VERSION_STRING = "1.0.1" - GIT_TAG_NAME = "1.0.1" - GIT_COMMITS_SINCE_TAG = 0 - GIT_COMMIT_ID = "%s" - MODIFIED_SINCE_COMMIT = False - IS_DEV_VERSION = False - IS_STABLE_VERSION = True - - VERSION_COMPONENTS = ["1", "0", "1"] - VERSION_TAG = "" - """ % commit_id[0:7] - main.create_version_file(git_directory=git.dir, output_file=out_file, lang="python") - self.assertCodeEqual(expected, self.read_file(out_file)) - - def test_tagged_git_with_commits_after_tag(self): - with GitDir() as git, TempFile() as out_file: - git.create_git_commit() - git.create_git_tag("1.0.1") - commit_id = git.create_git_commit() - expected = """ - # --------------------------------------------------- - # This file is autogenerated by git-version. - # DO NOT MODIFY! - # --------------------------------------------------- - - VERSION_STRING = "1.0.1.dev1+rev%s" - GIT_TAG_NAME = "1.0.1" - GIT_COMMITS_SINCE_TAG = 1 - GIT_COMMIT_ID = "%s" - MODIFIED_SINCE_COMMIT = False - IS_DEV_VERSION = True - IS_STABLE_VERSION = False - - VERSION_COMPONENTS = ["1", "0", "1"] - VERSION_TAG = "" - """ % (commit_id[0:7], commit_id[0:7]) - main.create_version_file(git_directory=git.dir, output_file=out_file, lang="python") - self.assertCodeEqual(expected, self.read_file(out_file)) - - def test_tagged_git_with_different_tagname_scheme(self): - with GitDir() as git, TempFile() as out_file: - commit_id = git.create_git_commit() - git.create_git_tag("versionone") - expected = """ - # --------------------------------------------------- - # This file is autogenerated by git-version. - # DO NOT MODIFY! - # --------------------------------------------------- - - VERSION_STRING = "versionone" - GIT_TAG_NAME = "versionone" - GIT_COMMITS_SINCE_TAG = 0 - GIT_COMMIT_ID = "%s" - MODIFIED_SINCE_COMMIT = False - IS_DEV_VERSION = False - """ % commit_id[0:7] - main.create_version_file(git_directory=git.dir, output_file=out_file, lang="python") - self.assertCodeEqual(expected, self.read_file(out_file)) - - def test_tagged_git_with_different_tagname_scheme_modified(self): - with GitDir() as git, TempFile() as out_file: - commit_id = git.create_git_commit() - git.create_git_tag("versionone") - git.add_untracked_file() - expected = """ - # --------------------------------------------------- - # This file is autogenerated by git-version. - # DO NOT MODIFY! - # --------------------------------------------------- - - VERSION_STRING = "versionone-modified" - GIT_TAG_NAME = "versionone" - GIT_COMMITS_SINCE_TAG = 0 - GIT_COMMIT_ID = "%s" - MODIFIED_SINCE_COMMIT = True - IS_DEV_VERSION = True - """ % commit_id[0:7] - main.create_version_file(git_directory=git.dir, output_file=out_file, lang="python") - self.assertCodeEqual(expected, self.read_file(out_file)) - - -if __name__ == '__main__': - unittest.main() diff --git a/vendor/gitversion/gitversion-1.9/src/test/test_utils.py b/vendor/gitversion/gitversion-1.9/src/test/test_utils.py deleted file mode 100644 index 2bc362bc..00000000 --- a/vendor/gitversion/gitversion-1.9/src/test/test_utils.py +++ /dev/null @@ -1,102 +0,0 @@ -from tempfile import NamedTemporaryFile, mkdtemp -import os -import shutil -import subprocess -import random -import string -from gitversionbuilder.utils import ChDir - - -class CodeAsserts(object): - def assertCodeEqual(self, expected, actual): - self.assertEqual(self._normalize(expected), self._normalize(actual)) - - def read_file(self, filename): - with open(filename, 'r') as open_file: - return open_file.read() - - def _normalize(self, string): - lines = string.splitlines() - normalized_lines = map(self._normalize_line, lines) - without_empty_lines = filter(None, normalized_lines) - return "\n".join(without_empty_lines) - - def _normalize_line(self, line): - tokens = line.split() - return " ".join(tokens) - - -class TempFile(object): - def __enter__(self): - f = NamedTemporaryFile() - f.close() # This also deletes the file - self.filename = f.name - return f.name - - def __exit__(self, type, value, tb): - if os.path.isfile(self.filename): - os.remove(self.filename) - - -class GitDir(object): - def __enter__(self): - self.dir = mkdtemp() - self._setup_git() - return self - - def __exit__(self, type, value, traceback): - shutil.rmtree(self.dir) - - def _setup_git(self): - with ChDir(self.dir): - self._silent_call(["git", "init"]) - self._silent_call(["git", "config", "user.email", "you@example.com"]); - self._silent_call(["git", "config", "user.name", "Your Name"]); - - def create_git_commit(self): - self.add_tracked_file() - with ChDir(self.dir): - self._silent_call(["git", "commit", "-m", "message"]) - commit_id = self._silent_call(["git", "rev-parse", "--short", "HEAD"]).strip() - return commit_id - - def add_untracked_file(self): - filename = self._random_string(10) - with ChDir(self.dir): - self._silent_call(["touch", filename]) - return filename - - def add_tracked_file(self): - filename = self.add_untracked_file() - with ChDir(self.dir): - self._silent_call(["git", "add", filename]) - return filename - - def modify_file(self, filename): - content = self._random_string(10) - with ChDir(self.dir): - with open(filename, 'w') as file: - file.write(content) - - def _random_string(self, length): - return ''.join(random.choice(string.ascii_lowercase) for _ in range(length)) - - def _silent_call(self, command): - with open(os.devnull, 'w') as devnull: - return subprocess.check_output(command, stderr=devnull).decode() - - def create_git_branch(self, branch_name): - with ChDir(self.dir): - self._silent_call(["git", "checkout", "-b", branch_name]) - - def switch_git_branch(self, branch_name): - with ChDir(self.dir): - self._silent_call(["git", "checkout", branch_name]) - - def checkout_git_commit(self, commit_id): - with ChDir(self.dir): - self._silent_call(["git", "checkout", commit_id]) - - def create_git_tag(self, tag_name): - with ChDir(self.dir): - self._silent_call(["git", "tag", tag_name]) diff --git a/vendor/gitversion/gitversion-1.9/src/test/utils_test.py b/vendor/gitversion/gitversion-1.9/src/test/utils_test.py deleted file mode 100644 index 4e1d3a35..00000000 --- a/vendor/gitversion/gitversion-1.9/src/test/utils_test.py +++ /dev/null @@ -1,21 +0,0 @@ -import unittest -import os -from gitversionbuilder import utils - - -class UtilsTest(unittest.TestCase): - def test_chdir_to_root(self): - curdir = os.getcwd() - with utils.ChDir('/'): - self.assertEqual('/', os.getcwd()) - self.assertEqual(curdir, os.getcwd()) - - def test_chdir_to_parent(self): - curdir = os.getcwd() - with utils.ChDir('..'): - self.assertEqual(os.path.abspath(os.path.join(curdir, '..')), os.getcwd()) - self.assertEqual(curdir, os.getcwd()) - - -if __name__ == '__main__': - unittest.main() diff --git a/vendor/gitversion/gitversion-1.9/src/test/versioninfo_test.py b/vendor/gitversion/gitversion-1.9/src/test/versioninfo_test.py deleted file mode 100644 index 8339b30b..00000000 --- a/vendor/gitversion/gitversion-1.9/src/test/versioninfo_test.py +++ /dev/null @@ -1,194 +0,0 @@ -import unittest - -from gitversionbuilder.versioninfo import VersionInfo, TagInterpretation - - -class VersionInfoTest(unittest.TestCase): - def test_equals(self): - self.assertEqual(VersionInfo("v1.6.0", 20, "23fa", True, False), - VersionInfo("v1.6.0", 20, "23fa", True, False)) - - def test_not_equals_tag(self): - self.assertNotEqual(VersionInfo("v1.6.0", 20, "23fa", True, False), - VersionInfo("v1.6.1", 20, "23fa", True, False)) - - def test_not_equals_commits_since_tag(self): - self.assertNotEqual(VersionInfo("v1.6.1", 20, "23fa", True, False), - VersionInfo("v1.6.1", 21, "23fa", True, False)) - - def test_not_equals_commit_id(self): - self.assertNotEqual(VersionInfo("v1.6.1", 20, "23fa", True, False), - VersionInfo("v1.6.1", 20, "23fb", True, False)) - - def test_not_equals_is_tag(self): - self.assertNotEqual(VersionInfo("v1.6.1", 20, "23fa", True, False), - VersionInfo("v1.6.1", 20, "23fa", False, False)) - - def test_not_equals_modified_since_commit(self): - self.assertNotEqual(VersionInfo("v1.6.1", 20, "23fa", True, False), - VersionInfo("v1.6.1", 20, "23fa", True, True)) - - def test_version_string_for_tag(self): - self.assertEqual("v1.5", VersionInfo("v1.5", 0, "23fa", True, False).version_string) - - def test_version_string_for_tag_modified(self): - self.assertEqual("v1.5-modified", VersionInfo("v1.5", 0, "23fa", True, True).version_string) - - def test_version_string_with_no_tag(self): - self.assertEqual("dev2+rev23fa", VersionInfo("develop", 2, "23fa", False, False).version_string) - - def test_version_string_with_no_tag_modified(self): - self.assertEqual("dev2+rev23fa-modified", VersionInfo("develop", 2, "23fa", False, True).version_string) - - def test_version_string_with_commits_since_tag(self): - self.assertEqual("v1.5.dev2+rev23fa", VersionInfo("v1.5", 2, "23fa", True, False).version_string) - - def test_version_string_with_commits_since_tag_modified(self): - self.assertEqual("v1.5.dev2+rev23fa-modified", VersionInfo("v1.5", 2, "23fa", True, True).version_string) - - def test_is_dev_1(self): - self.assertTrue(VersionInfo("1.0", 1, "23fa", True, False).is_dev) - - def test_is_dev_123(self): - self.assertTrue(VersionInfo("1.0", 123, "23fa", True, False).is_dev) - - def test_is_dev_no_commits(self): - self.assertTrue(VersionInfo("1.0", 0, "23fa", False, False).is_dev) - - def test_is_dev_modified(self): - self.assertTrue(VersionInfo("1.0", 0, "23fa", True, True).is_dev) - - def test_is_not_dev(self): - self.assertFalse(VersionInfo("1.0", 0, "23fa", True, False).is_dev) - - def test_interpret_valid_tag_name(self): - self.assertEqual(TagInterpretation(["1"], "", False), - VersionInfo("1", 0, "23fa", True, False).interpret_tag_name()) - - def test_interpret_valid_tag_name_plain(self): - self.assertEqual(TagInterpretation(["1", "0"], "", False), - VersionInfo("1.0", 0, "23fa", True, False).interpret_tag_name()) - - def test_interpret_valid_tag_name_alpha(self): - self.assertEqual(TagInterpretation(["1", "0"], "alpha", False), - VersionInfo("1.0alpha", 0, "23fa", True, False).interpret_tag_name()) - - def test_interpret_valid_tag_name_alpha_number(self): - self.assertEqual(TagInterpretation(["1", "0"], "alpha2", False), - VersionInfo("1.0alpha2", 0, "23fa", True, False).interpret_tag_name()) - - def test_interpret_valid_tag_name_beta(self): - self.assertEqual(TagInterpretation(["1", "0"], "beta", False), - VersionInfo("1.0beta", 0, "23fa", True, False).interpret_tag_name()) - - def test_interpret_valid_tag_name_beta_number(self): - self.assertEqual(TagInterpretation(["1", "0"], "beta3", False), - VersionInfo("1.0beta3", 0, "23fa", True, False).interpret_tag_name()) - - def test_interpret_valid_tag_name_with_dash(self): - self.assertEqual(TagInterpretation(["1", "02", "3"], "beta", False), - VersionInfo("1.02.3-beta", 0, "23fa", True, False).interpret_tag_name()) - - def test_interpret_valid_tag_name_with_zeroes_in_component(self): - self.assertEqual(TagInterpretation(["1", "020", "3"], "beta", False), - VersionInfo("1.020.3-beta", 0, "23fa", True, False).interpret_tag_name()) - - def test_interpret_valid_tag_name_stable(self): - self.assertEqual(TagInterpretation(["1", "02"], "stable", False), - VersionInfo("1.02-stable", 0, "23fa", True, False).interpret_tag_name()) - - def test_interpret_valid_tag_name_final(self): - self.assertEqual(TagInterpretation(["0", "8"], "final", False), - VersionInfo("0.8final", 0, "23fa", True, False).interpret_tag_name()) - - def test_interpret_valid_tag_name_M3(self): - self.assertEqual(TagInterpretation(["0", "8"], "M3", False), - VersionInfo("0.8-M3", 0, "23fa", True, False).interpret_tag_name()) - - def test_interpret_valid_tag_name_m3(self): - self.assertEqual(TagInterpretation(["0", "8"], "m3", False), - VersionInfo("0.8m3", 0, "23fa", True, False).interpret_tag_name()) - - def test_interpret_valid_tag_name_rc2(self): - self.assertEqual(TagInterpretation(["0", "8"], "rc2", False), - VersionInfo("0.8rc2", 0, "23fa", True, False).interpret_tag_name()) - - def test_interpret_valid_tag_name_RC2(self): - self.assertEqual(TagInterpretation(["0", "8"], "RC2", False), - VersionInfo("0.8-RC2", 0, "23fa", True, False).interpret_tag_name()) - - def test_interpret_valid_tag_name_pre2(self): - self.assertEqual(TagInterpretation(["0", "8"], "pre2", False), - VersionInfo("0.8-pre2", 0, "23fa", True, False).interpret_tag_name()) - - def test_interpret_valid_tag_name_of_dev_version_1(self): - self.assertEqual(TagInterpretation(["0", "8"], "", True), - VersionInfo("0.8", 1, "23fa", True, False).interpret_tag_name()) - - def test_interpret_valid_tag_name_of_dev_version_2(self): - self.assertEqual(TagInterpretation(["0", "8"], "", True), - VersionInfo("0.8", 123, "23fa", True, False).interpret_tag_name()) - - def test_interpret_invalid_tag_name(self): - self.assertEqual(None, VersionInfo("develop", 0, "23fa", True, False).interpret_tag_name()) - - def test_interpret_invalid_tag_name_invalid_tag(self): - self.assertEqual(None, VersionInfo("1.0invalid", 0, "23fa", True, False).interpret_tag_name()) - - def test_interpret_invalid_tag_name_invalid_tag_with_dash(self): - self.assertEqual(None, VersionInfo("1.0-invalid", 0, "23fa", True, False).interpret_tag_name()) - - def test_interpret_invalid_tag_name_invalid_number(self): - self.assertEqual(None, VersionInfo("develop-alpha", 0, "23fa", True, False).interpret_tag_name()) - - def test_interpret_invalid_tag_name_invalid_component_separator(self): - self.assertEqual(None, VersionInfo("1,0-alpha", 0, "23fa", True, False).interpret_tag_name()) - - def test_interpret_invalid_tag_name_invalid_missing_component(self): - self.assertEqual(None, VersionInfo("1,-alpha", 0, "23fa", True, False).interpret_tag_name()) - - -class TagInterpretationTest(unittest.TestCase): - def test_equals(self): - self.assertEqual(TagInterpretation(["1", "2"], "alpha", False), - TagInterpretation(["1", "2"], "alpha", False)) - - def test_not_equals_version_tag(self): - self.assertNotEqual(TagInterpretation(["1", "2"], "beta", False), - TagInterpretation(["1", "2"], "alpha", False)) - - def test_not_equals_components_1(self): - self.assertNotEqual(TagInterpretation(["1"], "alpha", False), - TagInterpretation(["1", "2"], "alpha", False)) - - def test_not_equals_components_2(self): - self.assertNotEqual(TagInterpretation(["1", "3"], "alpha", False), - TagInterpretation(["1", "2"], "alpha", False)) - - def test_alpha_is_not_stable(self): - self.assertFalse(TagInterpretation(["1"], "alpha", False).is_stable) - - def test_beta_is_not_stable(self): - self.assertFalse(TagInterpretation(["1"], "beta", False).is_stable) - - def test_rc3_is_not_stable(self): - self.assertFalse(TagInterpretation(["1"], "rc3", False).is_stable) - - def test_M3_is_not_stable(self): - self.assertFalse(TagInterpretation(["1"], "M3", False).is_stable) - - def test_stable_is_stable(self): - self.assertTrue(TagInterpretation(["1"], "stable", False).is_stable) - - def test_final_is_stable(self): - self.assertTrue(TagInterpretation(["1"], "final", False).is_stable) - - def test_plain_is_stable(self): - self.assertTrue(TagInterpretation(["1"], "", False).is_stable) - - def test_dev_is_not_stable(self): - self.assertFalse(TagInterpretation(["1"], "", True).is_stable) - - -if __name__ == '__main__': - unittest.main() diff --git a/vendor/gitversion/gitversion-1.9/src/test/versioninfooutputter_test.py b/vendor/gitversion/gitversion-1.9/src/test/versioninfooutputter_test.py deleted file mode 100644 index b38eaa64..00000000 --- a/vendor/gitversion/gitversion-1.9/src/test/versioninfooutputter_test.py +++ /dev/null @@ -1,341 +0,0 @@ -import unittest - -from gitversionbuilder import versioninfo, versioninfooutputter -from test import test_utils - - -class VersionInfoOutputterTest(unittest.TestCase, test_utils.CodeAsserts): - def test_output_cpp(self): - expected = """ - // --------------------------------------------------- - // This file is autogenerated by git-version. - // DO NOT MODIFY! - // --------------------------------------------------- - - #pragma once - #ifndef MESSMER_GITVERSION_VERSION_H - #define MESSMER_GITVERSION_VERSION_H - - namespace version { - constexpr const char *VERSION_STRING = "versionone.dev2+rev230a"; - constexpr const char *GIT_TAG_NAME = "versionone"; - constexpr const unsigned int GIT_COMMITS_SINCE_TAG = 2; - constexpr const char *GIT_COMMIT_ID = "230a"; - constexpr bool MODIFIED_SINCE_COMMIT = false; - constexpr bool IS_DEV_VERSION = true; - } - - #endif - """ - actual = versioninfooutputter.to_cpp(versioninfo.VersionInfo("versionone", 2, "230a", True, False)) - self.assertCodeEqual(expected, actual) - - def test_output_cpp_without_tag(self): - expected = """ - // --------------------------------------------------- - // This file is autogenerated by git-version. - // DO NOT MODIFY! - // --------------------------------------------------- - - #pragma once - #ifndef MESSMER_GITVERSION_VERSION_H - #define MESSMER_GITVERSION_VERSION_H - - namespace version { - constexpr const char *VERSION_STRING = "dev2+rev230a"; - constexpr const char *GIT_TAG_NAME = "develop"; - constexpr const unsigned int GIT_COMMITS_SINCE_TAG = 2; - constexpr const char *GIT_COMMIT_ID = "230a"; - constexpr bool MODIFIED_SINCE_COMMIT = false; - constexpr bool IS_DEV_VERSION = true; - constexpr bool IS_STABLE_VERSION = false; - } - - #endif - """ - actual = versioninfooutputter.to_cpp(versioninfo.VersionInfo("develop", 2, "230a", False, False)) - self.assertCodeEqual(expected, actual) - - def test_output_cpp_with_version_info(self): - expected = """ - // --------------------------------------------------- - // This file is autogenerated by git-version. - // DO NOT MODIFY! - // --------------------------------------------------- - - #pragma once - #ifndef MESSMER_GITVERSION_VERSION_H - #define MESSMER_GITVERSION_VERSION_H - - namespace version { - constexpr const char *VERSION_STRING = "1.6.dev2+rev230a"; - constexpr const char *GIT_TAG_NAME = "1.6"; - constexpr const unsigned int GIT_COMMITS_SINCE_TAG = 2; - constexpr const char *GIT_COMMIT_ID = "230a"; - constexpr bool MODIFIED_SINCE_COMMIT = false; - constexpr bool IS_DEV_VERSION = true; - constexpr bool IS_STABLE_VERSION = false; - - constexpr const char *VERSION_COMPONENTS[] = {"1", "6"}; - constexpr const char *VERSION_TAG = ""; - } - - #endif - """ - actual = versioninfooutputter.to_cpp(versioninfo.VersionInfo("1.6", 2, "230a", True, False)) - self.assertCodeEqual(expected, actual) - - def test_output_cpp_with_version_info_with_leading_zero(self): - expected = """ - // --------------------------------------------------- - // This file is autogenerated by git-version. - // DO NOT MODIFY! - // --------------------------------------------------- - - #pragma once - #ifndef MESSMER_GITVERSION_VERSION_H - #define MESSMER_GITVERSION_VERSION_H - - namespace version { - constexpr const char *VERSION_STRING = "1.06.dev2+rev230a"; - constexpr const char *GIT_TAG_NAME = "1.06"; - constexpr const unsigned int GIT_COMMITS_SINCE_TAG = 2; - constexpr const char *GIT_COMMIT_ID = "230a"; - constexpr bool MODIFIED_SINCE_COMMIT = false; - constexpr bool IS_DEV_VERSION = true; - constexpr bool IS_STABLE_VERSION = false; - - constexpr const char *VERSION_COMPONENTS[] = {"1", "06"}; - constexpr const char *VERSION_TAG = ""; - } - - #endif - """ - actual = versioninfooutputter.to_cpp(versioninfo.VersionInfo("1.06", 2, "230a", True, False)) - self.assertCodeEqual(expected, actual) - - def test_output_cpp_with_version_info_and_version_tag(self): - expected = """ - // --------------------------------------------------- - // This file is autogenerated by git-version. - // DO NOT MODIFY! - // --------------------------------------------------- - - #pragma once - #ifndef MESSMER_GITVERSION_VERSION_H - #define MESSMER_GITVERSION_VERSION_H - - namespace version { - constexpr const char *VERSION_STRING = "1.6alpha.dev2+rev230a"; - constexpr const char *GIT_TAG_NAME = "1.6alpha"; - constexpr const unsigned int GIT_COMMITS_SINCE_TAG = 2; - constexpr const char *GIT_COMMIT_ID = "230a"; - constexpr bool MODIFIED_SINCE_COMMIT = false; - constexpr bool IS_DEV_VERSION = true; - constexpr bool IS_STABLE_VERSION = false; - - constexpr const char *VERSION_COMPONENTS[] = {"1", "6"}; - constexpr const char *VERSION_TAG = "alpha"; - } - - #endif - """ - actual = versioninfooutputter.to_cpp(versioninfo.VersionInfo("1.6alpha", 2, "230a", True, False)) - self.assertCodeEqual(expected, actual) - - def test_output_cpp_with_version_info_and_dashed_version_tag(self): - expected = """ - // --------------------------------------------------- - // This file is autogenerated by git-version. - // DO NOT MODIFY! - // --------------------------------------------------- - - #pragma once - #ifndef MESSMER_GITVERSION_VERSION_H - #define MESSMER_GITVERSION_VERSION_H - - namespace version { - constexpr const char *VERSION_STRING = "1.6-alpha.dev2+rev230a"; - constexpr const char *GIT_TAG_NAME = "1.6-alpha"; - constexpr const unsigned int GIT_COMMITS_SINCE_TAG = 2; - constexpr const char *GIT_COMMIT_ID = "230a"; - constexpr bool MODIFIED_SINCE_COMMIT = false; - constexpr bool IS_DEV_VERSION = true; - constexpr bool IS_STABLE_VERSION = false; - - constexpr const char *VERSION_COMPONENTS[] = {"1", "6"}; - constexpr const char *VERSION_TAG = "alpha"; - } - - #endif - """ - actual = versioninfooutputter.to_cpp(versioninfo.VersionInfo("1.6-alpha", 2, "230a", True, False)) - self.assertCodeEqual(expected, actual) - - def test_output_python(self): - expected = """ - # --------------------------------------------------- - # This file is autogenerated by git-version. - # DO NOT MODIFY! - # --------------------------------------------------- - - VERSION_STRING = "versiontwo.dev2+rev230a" - GIT_TAG_NAME = "versiontwo" - GIT_COMMITS_SINCE_TAG = 2 - GIT_COMMIT_ID = "230a" - MODIFIED_SINCE_COMMIT = False - IS_DEV_VERSION = True - """ - actual = versioninfooutputter.to_python(versioninfo.VersionInfo("versiontwo", 2, "230a", True, False)) - self.assertCodeEqual(expected, actual) - - def test_output_python_with_version_info(self): - expected = """ - # --------------------------------------------------- - # This file is autogenerated by git-version. - # DO NOT MODIFY! - # --------------------------------------------------- - - VERSION_STRING = "0.8.dev2+rev230a" - GIT_TAG_NAME = "0.8" - GIT_COMMITS_SINCE_TAG = 2 - GIT_COMMIT_ID = "230a" - MODIFIED_SINCE_COMMIT = False - IS_DEV_VERSION = True - IS_STABLE_VERSION = False - - VERSION_COMPONENTS = ["0", "8"] - VERSION_TAG = "" - """ - actual = versioninfooutputter.to_python(versioninfo.VersionInfo("0.8", 2, "230a", True, False)) - self.assertCodeEqual(expected, actual) - - def test_output_python_with_version_info_and_version_tag(self): - expected = """ - # --------------------------------------------------- - # This file is autogenerated by git-version. - # DO NOT MODIFY! - # --------------------------------------------------- - - VERSION_STRING = "v1.0alpha.dev2+rev230a" - GIT_TAG_NAME = "v1.0alpha" - GIT_COMMITS_SINCE_TAG = 2 - GIT_COMMIT_ID = "230a" - MODIFIED_SINCE_COMMIT = False - IS_DEV_VERSION = True - IS_STABLE_VERSION = False - - VERSION_COMPONENTS = ["1", "0"] - VERSION_TAG = "alpha" - """ - actual = versioninfooutputter.to_python(versioninfo.VersionInfo("v1.0alpha", 2, "230a", True, False)) - self.assertCodeEqual(expected, actual) - - def test_output_python_with_version_info_and_version_tag_modified(self): - expected = """ - # --------------------------------------------------- - # This file is autogenerated by git-version. - # DO NOT MODIFY! - # --------------------------------------------------- - - VERSION_STRING = "v1.0alpha.dev2+rev230a-modified" - GIT_TAG_NAME = "v1.0alpha" - GIT_COMMITS_SINCE_TAG = 2 - GIT_COMMIT_ID = "230a" - MODIFIED_SINCE_COMMIT = True - IS_DEV_VERSION = True - IS_STABLE_VERSION = False - - VERSION_COMPONENTS = ["1", "0"] - VERSION_TAG = "alpha" - """ - actual = versioninfooutputter.to_python(versioninfo.VersionInfo("v1.0alpha", 2, "230a", True, True)) - self.assertCodeEqual(expected, actual) - - def test_output_python_instable_nondev(self): - expected = """ - # --------------------------------------------------- - # This file is autogenerated by git-version. - # DO NOT MODIFY! - # --------------------------------------------------- - - VERSION_STRING = "v1.0alpha" - GIT_TAG_NAME = "v1.0alpha" - GIT_COMMITS_SINCE_TAG = 0 - GIT_COMMIT_ID = "230a" - MODIFIED_SINCE_COMMIT = False - IS_DEV_VERSION = False - IS_STABLE_VERSION = False - - VERSION_COMPONENTS = ["1", "0"] - VERSION_TAG = "alpha" - """ - actual = versioninfooutputter.to_python(versioninfo.VersionInfo("v1.0alpha", 0, "230a", True, False)) - self.assertCodeEqual(expected, actual) - - def test_output_python_stable_nondev_plain(self): - expected = """ - # --------------------------------------------------- - # This file is autogenerated by git-version. - # DO NOT MODIFY! - # --------------------------------------------------- - - VERSION_STRING = "v1.0" - GIT_TAG_NAME = "v1.0" - GIT_COMMITS_SINCE_TAG = 0 - GIT_COMMIT_ID = "230a" - MODIFIED_SINCE_COMMIT = False - IS_DEV_VERSION = False - IS_STABLE_VERSION = True - - VERSION_COMPONENTS = ["1", "0"] - VERSION_TAG = "" - """ - actual = versioninfooutputter.to_python(versioninfo.VersionInfo("v1.0", 0, "230a", True, False)) - self.assertCodeEqual(expected, actual) - - def test_output_python_stable_stable(self): - expected = """ - # --------------------------------------------------- - # This file is autogenerated by git-version. - # DO NOT MODIFY! - # --------------------------------------------------- - - VERSION_STRING = "v1.0-stable" - GIT_TAG_NAME = "v1.0-stable" - GIT_COMMITS_SINCE_TAG = 0 - GIT_COMMIT_ID = "230a" - MODIFIED_SINCE_COMMIT = False - IS_DEV_VERSION = False - IS_STABLE_VERSION = True - - VERSION_COMPONENTS = ["1", "0"] - VERSION_TAG = "stable" - """ - actual = versioninfooutputter.to_python(versioninfo.VersionInfo("v1.0-stable", 0, "230a", True, False)) - self.assertCodeEqual(expected, actual) - - def test_output_python_modified(self): - expected = """ - # --------------------------------------------------- - # This file is autogenerated by git-version. - # DO NOT MODIFY! - # --------------------------------------------------- - - VERSION_STRING = "v1.0-stable-modified" - GIT_TAG_NAME = "v1.0-stable" - GIT_COMMITS_SINCE_TAG = 0 - GIT_COMMIT_ID = "230a" - MODIFIED_SINCE_COMMIT = True - IS_DEV_VERSION = True - IS_STABLE_VERSION = False - - VERSION_COMPONENTS = ["1", "0"] - VERSION_TAG = "stable" - """ - actual = versioninfooutputter.to_python(versioninfo.VersionInfo("v1.0-stable", 0, "230a", True, True)) - self.assertCodeEqual(expected, actual) - - -if __name__ == '__main__': - unittest.main() diff --git a/vendor/gitversion/gitversion-1.9/src/test/versioninforeader_test.py b/vendor/gitversion/gitversion-1.9/src/test/versioninforeader_test.py deleted file mode 100644 index 58d2dca3..00000000 --- a/vendor/gitversion/gitversion-1.9/src/test/versioninforeader_test.py +++ /dev/null @@ -1,286 +0,0 @@ -import unittest - -from gitversionbuilder import versioninforeader -from gitversionbuilder.versioninfo import VersionInfo -from test.test_utils import GitDir - - -class ParseGitVersionTest(unittest.TestCase): - def test_parse_git_version_simple(self): - obj = versioninforeader._parse_git_version("v1.6-0-g3f2a", False) - self.assertEqual(VersionInfo("v1.6", 0, "3f2a", True, False), obj) - - def test_parse_git_version_with_commits_since_tag(self): - obj = versioninforeader._parse_git_version("v1.6.3-23-g49302", False) - self.assertEqual(VersionInfo("v1.6.3", 23, "49302", True, False), obj) - - def test_parse_git_version_with_dashes_in_tag(self): - obj = versioninforeader._parse_git_version("v1.6.3-23-20-gfade", False) - self.assertEqual(VersionInfo("v1.6.3-23", 20, "fade", True, False), obj) - - def test_parse_git_version_with_slashes_in_tag(self): - obj = versioninforeader._parse_git_version("/heads/develop-20-gfade", False) - self.assertEqual(VersionInfo("/heads/develop", 20, "fade", True, False), obj) - - def test_parse_git_version_missing_tag(self): - self.assertRaises(versioninforeader.VersionParseError, versioninforeader._parse_git_version, "23-gfade", False) - - def test_parse_git_version_empty_tag(self): - self.assertRaises(versioninforeader.VersionParseError, versioninforeader._parse_git_version, "-23-gfade", False) - - def test_parse_git_version_missing_commits_since_tag(self): - self.assertRaises(versioninforeader.VersionParseError, versioninforeader._parse_git_version, "v2.3-gfade", - False) - - def test_parse_git_version_empty_commits_since_tag(self): - self.assertRaises(versioninforeader.VersionParseError, versioninforeader._parse_git_version, "v2.3--gfade", - False) - - def test_parse_git_version_commits_since_tag_not_int(self): - self.assertRaises(versioninforeader.VersionParseError, versioninforeader._parse_git_version, "v2.3-a2-gfade", - False) - - def test_parse_git_version_missing_commit_id(self): - self.assertRaises(versioninforeader.VersionParseError, versioninforeader._parse_git_version, "v2.3-20", False) - - def test_parse_git_version_empty_commit_id(self): - self.assertRaises(versioninforeader.VersionParseError, versioninforeader._parse_git_version, "v2.3-20-", False) - - -class VersionInfoReaderTest(unittest.TestCase): - def test_empty(self): - with GitDir() as dir: - version_info = versioninforeader.from_git(dir.dir) - self.assertEqual(VersionInfo("HEAD", 0, "0", False, False), version_info) - - def test_commit(self): - with GitDir() as dir: - commit_id = dir.create_git_commit() - version_info = versioninforeader.from_git(dir.dir) - self.assertEqual(VersionInfo("master", 1, commit_id, False, False), version_info) - - def test_commit_commit(self): - with GitDir() as dir: - dir.create_git_commit() - commit_id = dir.create_git_commit() - version_info = versioninforeader.from_git(dir.dir) - self.assertEqual(VersionInfo("master", 2, commit_id, False, False), version_info) - - def test_commit_tag(self): - with GitDir() as dir: - commit_id = dir.create_git_commit() - dir.create_git_tag("tagname") - version_info = versioninforeader.from_git(dir.dir) - self.assertEqual(VersionInfo("tagname", 0, commit_id, True, False), version_info) - - def test_commit_tag_commit(self): - with GitDir() as dir: - dir.create_git_commit() - dir.create_git_tag("tagname") - commit_id = dir.create_git_commit() - version_info = versioninforeader.from_git(dir.dir) - self.assertEqual(VersionInfo("tagname", 1, commit_id, True, False), version_info) - - def test_commit_tag_commit_commit(self): - with GitDir() as dir: - dir.create_git_commit() - dir.create_git_tag("tagname") - dir.create_git_commit() - commit_id = dir.create_git_commit() - version_info = versioninforeader.from_git(dir.dir) - self.assertEqual(VersionInfo("tagname", 2, commit_id, True, False), version_info) - - def test_commit_tag_commit_tag_commit(self): - with GitDir() as dir: - dir.create_git_commit() - dir.create_git_tag("tagname") - dir.create_git_commit() - dir.create_git_tag("mytag2") - commit_id = dir.create_git_commit() - version_info = versioninforeader.from_git(dir.dir) - self.assertEqual(VersionInfo("mytag2", 1, commit_id, True, False), version_info) - - def test_commit_commit_tag_rewind(self): - with GitDir() as dir: - dir.create_git_commit() - commit_id = dir.create_git_commit() - dir.create_git_commit() - dir.create_git_tag("tagname") - dir.checkout_git_commit(commit_id) - version_info = versioninforeader.from_git(dir.dir) - self.assertEqual(VersionInfo("HEAD", 2, commit_id, False, False), version_info) - - def test_commit_tag_commit_commit_tag_rewind(self): - with GitDir() as dir: - dir.create_git_commit() - dir.create_git_tag("tagname") - commit_id = dir.create_git_commit() - dir.create_git_commit() - dir.create_git_tag("mytag2") - dir.checkout_git_commit(commit_id) - version_info = versioninforeader.from_git(dir.dir) - self.assertEqual(VersionInfo("tagname", 1, commit_id, True, False), version_info) - - def test_commit_branch(self): - with GitDir() as dir: - commit_id = dir.create_git_commit() - dir.create_git_branch("newbranch") - version_info = versioninforeader.from_git(dir.dir) - self.assertEqual(VersionInfo("newbranch", 1, commit_id, False, False), version_info) - - def test_commit_branch_commit(self): - with GitDir() as dir: - dir.create_git_commit() - dir.create_git_branch("newbranch") - commit_id = dir.create_git_commit() - version_info = versioninforeader.from_git(dir.dir) - self.assertEqual(VersionInfo("newbranch", 2, commit_id, False, False), version_info) - - def test_commit_tag_commit_branch_commit(self): - with GitDir() as dir: - dir.create_git_commit() - dir.create_git_tag("mytag") - dir.create_git_commit() - dir.create_git_branch("newbranch") - commit_id = dir.create_git_commit() - version_info = versioninforeader.from_git(dir.dir) - self.assertEqual(VersionInfo("mytag", 2, commit_id, True, False), version_info) - - def test_commit_branchedcommit(self): - with GitDir() as dir: - commit_id = dir.create_git_commit() - dir.create_git_branch("newbranch") - dir.create_git_commit() - dir.switch_git_branch("master") - version_info = versioninforeader.from_git(dir.dir) - self.assertEqual(VersionInfo("master", 1, commit_id, False, False), version_info) - - def test_commit_branchedtaggedcommit(self): - with GitDir() as dir: - commit_id = dir.create_git_commit() - dir.create_git_branch("newbranch") - dir.create_git_commit() - dir.create_git_tag("mytag") - dir.switch_git_branch("master") - version_info = versioninforeader.from_git(dir.dir) - self.assertEqual(VersionInfo("master", 1, commit_id, False, False), version_info) - - def test_commit_tag_branchedtaggedcommit(self): - with GitDir() as dir: - commit_id = dir.create_git_commit() - dir.create_git_tag("originaltag") - dir.create_git_branch("newbranch") - dir.create_git_commit() - dir.create_git_tag("newtag") - dir.switch_git_branch("master") - version_info = versioninforeader.from_git(dir.dir) - self.assertEqual(VersionInfo("originaltag", 0, commit_id, True, False), version_info) - - def test_commit_tag_commit_branchedtaggedcommit(self): - with GitDir() as dir: - dir.create_git_commit() - dir.create_git_tag("originaltag") - commit_id = dir.create_git_commit() - dir.create_git_branch("newbranch") - dir.create_git_commit() - dir.create_git_tag("newtag") - dir.switch_git_branch("master") - version_info = versioninforeader.from_git(dir.dir) - self.assertEqual(VersionInfo("originaltag", 1, commit_id, True, False), version_info) - - - - # ------------------------------------------------------------- - # Test that local uncommitted changes are recognized correctly - # ------------------------------------------------------------- - - def test_empty_with_untracked_file(self): - with GitDir() as dir: - dir.add_untracked_file() - version_info = versioninforeader.from_git(dir.dir) - self.assertEqual(VersionInfo("HEAD", 0, "0", False, True), version_info) - - def test_empty_with_tracked_file(self): - with GitDir() as dir: - dir.add_tracked_file() - version_info = versioninforeader.from_git(dir.dir) - self.assertEqual(VersionInfo("HEAD", 0, "0", False, True), version_info) - - def test_commit_with_untracked_file(self): - with GitDir() as dir: - commit_id = dir.create_git_commit() - dir.add_untracked_file() - version_info = versioninforeader.from_git(dir.dir) - self.assertEqual(VersionInfo("master", 1, commit_id, False, True), version_info) - - def test_commit_with_tracked_file(self): - with GitDir() as dir: - commit_id = dir.create_git_commit() - dir.add_tracked_file() - version_info = versioninforeader.from_git(dir.dir) - self.assertEqual(VersionInfo("master", 1, commit_id, False, True), version_info) - - def test_commit_with_modified_file(self): - with GitDir() as dir: - filename = dir.add_tracked_file() - commit_id = dir.create_git_commit() - dir.modify_file(filename) - version_info = versioninforeader.from_git(dir.dir) - self.assertEqual(VersionInfo("master", 1, commit_id, False, True), version_info) - - def test_tag_with_untracked_file(self): - with GitDir() as dir: - commit_id = dir.create_git_commit() - dir.create_git_tag("mytag") - dir.add_untracked_file() - version_info = versioninforeader.from_git(dir.dir) - self.assertEqual(VersionInfo("mytag", 0, commit_id, True, True), version_info) - - def test_tag_with_tracked_file(self): - with GitDir() as dir: - commit_id = dir.create_git_commit() - dir.create_git_tag("mytag") - dir.add_tracked_file() - version_info = versioninforeader.from_git(dir.dir) - self.assertEqual(VersionInfo("mytag", 0, commit_id, True, True), version_info) - - def test_tag_with_modified_file(self): - with GitDir() as dir: - filename = dir.add_tracked_file() - commit_id = dir.create_git_commit() - dir.create_git_tag("mytag") - dir.modify_file(filename) - version_info = versioninforeader.from_git(dir.dir) - self.assertEqual(VersionInfo("mytag", 0, commit_id, True, True), version_info) - - def test_tag_commit_with_untracked_file(self): - with GitDir() as dir: - dir.create_git_commit() - dir.create_git_tag("mytag") - commit_id = dir.create_git_commit() - dir.add_untracked_file() - version_info = versioninforeader.from_git(dir.dir) - self.assertEqual(VersionInfo("mytag", 1, commit_id, True, True), version_info) - - def test_tag_commit_with_tracked_file(self): - with GitDir() as dir: - dir.create_git_commit() - dir.create_git_tag("mytag") - commit_id = dir.create_git_commit() - dir.add_tracked_file() - version_info = versioninforeader.from_git(dir.dir) - self.assertEqual(VersionInfo("mytag", 1, commit_id, True, True), version_info) - - def test_tag_commit_with_modified_file(self): - with GitDir() as dir: - filename = dir.add_tracked_file() - dir.create_git_commit() - dir.create_git_tag("mytag") - commit_id = dir.create_git_commit() - dir.modify_file(filename) - version_info = versioninforeader.from_git(dir.dir) - self.assertEqual(VersionInfo("mytag", 1, commit_id, True, True), version_info) - - -if __name__ == '__main__': - unittest.main()