From 8ec0db3a376e9497f3e181c7e7e28e58e0644ee0 Mon Sep 17 00:00:00 2001 From: Stanislav Pankevich Date: Thu, 5 Dec 2019 22:20:40 +0100 Subject: [PATCH 1/2] Switch to bump2version --- .bumpversion.cfg | 13 +++++++++++++ filecheck/FileCheck.py | 14 +++----------- pyproject.toml | 1 + 3 files changed, 17 insertions(+), 11 deletions(-) create mode 100644 .bumpversion.cfg diff --git a/.bumpversion.cfg b/.bumpversion.cfg new file mode 100644 index 0000000..729f31d --- /dev/null +++ b/.bumpversion.cfg @@ -0,0 +1,13 @@ +[bumpversion] +current_version = 0.0.2 +commit = True +tag = True + +[bumpversion:file:pyproject.toml] +search = version = "{current_version}" +replace = version = "{new_version}" + +[bumpversion:file:filecheck/FileCheck.py] +search = __version__ = '{current_version}' +replace = __version__ = '{new_version}' + diff --git a/filecheck/FileCheck.py b/filecheck/FileCheck.py index c6cafcc..4067f62 100755 --- a/filecheck/FileCheck.py +++ b/filecheck/FileCheck.py @@ -8,17 +8,8 @@ from collections import namedtuple from difflib import SequenceMatcher from enum import Enum -from pkg_resources import DistributionNotFound, get_distribution - -__project__ = 'filecheck' - -try: - __version__ = get_distribution(__project__).version -except DistributionNotFound: - __version__ = '(local)' - -VERSION = "{0} v{1}".format(__project__, __version__) +__version__ = '0.0.2' class MatchType(Enum): @@ -62,7 +53,8 @@ def print_help(): def print_version(): - print(VERSION) + print(__version__) + def escape_non_regex_or_skip(match_obj): non_regex = match_obj.group('non_regex') diff --git a/pyproject.toml b/pyproject.toml index 29586fb..be79126 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,6 +9,7 @@ python = "^3.4" [tool.poetry.dev-dependencies] lit = "^0.9" +bump2version = "0.5.11" [tool.poetry.scripts] filecheck = "filecheck.FileCheck:main" From b701754a5d659d7fc0d6ea6325f1356f59cd8684 Mon Sep 17 00:00:00 2001 From: Stanislav Pankevich Date: Thu, 5 Dec 2019 22:46:56 +0100 Subject: [PATCH 2/2] =?UTF-8?q?Bump=20version:=200.0.2=20=E2=86=92=200.0.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- filecheck/FileCheck.py | 2 +- pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 729f31d..d2de08b 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.0.2 +current_version = 0.0.3 commit = True tag = True diff --git a/filecheck/FileCheck.py b/filecheck/FileCheck.py index 4067f62..945cf0a 100755 --- a/filecheck/FileCheck.py +++ b/filecheck/FileCheck.py @@ -9,7 +9,7 @@ from difflib import SequenceMatcher from enum import Enum -__version__ = '0.0.2' +__version__ = '0.0.3' class MatchType(Enum): diff --git a/pyproject.toml b/pyproject.toml index be79126..29e0412 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "filecheck" -version = "0.0.2" +version = "0.0.3" description = "Python port of LLVM's FileCheck, flexible pattern matching file verifier" authors = ["Stanislav Pankevich "]