From: David Wells Date: Sun, 14 May 2017 16:55:46 +0000 (-0400) Subject: Fix the output of the deprecation script. X-Git-Tag: v9.0.0-rc1~1587^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F4394%2Fhead;p=dealii.git Fix the output of the deprecation script. Some tags (e.g., 'rebase_here') may not be version numbers so we should not drop the first letter. --- diff --git a/contrib/utilities/print_deprecated.py b/contrib/utilities/print_deprecated.py index 642173c135..5e679379bb 100644 --- a/contrib/utilities/print_deprecated.py +++ b/contrib/utilities/print_deprecated.py @@ -81,11 +81,12 @@ class DeprecatedDeclaration(object): self.output_time = datetime.datetime.utcfromtimestamp(self.epoch_time) git_tag_output = subprocess.check_output(["git", "tag", "--contains", - self.commit_hash]) + self.commit_hash, + "-l", "v[0-9].[0-9].[0-9]"]) git_tag_output = decode_and_split(git_tag_output) - relevant_tags = [tag for tag in git_tag_output if "rc" not in tag] - if relevant_tags: - self.release = relevant_tags[0][1:] # skip the prepended 'v' + if git_tag_output: + # matched tags must start with 'v[0-9]': skip the v + self.release = git_tag_output[0][1:] else: self.release = ""