Skip to content

Commit

Permalink
Fixed publisher not correctly setting publish name
Browse files Browse the repository at this point in the history
  • Loading branch information
bkamphues committed Nov 26, 2020
1 parent 2b7415e commit f749c3c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions hooks/path_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
# this implementation assumes the version number is of the form 'v###'
# coming just before an optional extension in the file/folder name and just
# after a '.', '_', or '-'.
VERSION_REGEX = re.compile(r"(.*)([._-])v(\d+)\.?([^.]+)?$", re.IGNORECASE)
# VERSION_REGEX = re.compile(r"(.*)([._-])v(\d+)\.?([^.]+)?$", re.IGNORECASE)
VERSION_REGEX = re.compile(r"(.*)([._-])v(\d+)\.?([^.]+)?\.?([^.]+)?", re.IGNORECASE)

# a regular expression used to extract the frame number from the file.
# this implementation assumes the version number is of the form '.####'
Expand Down Expand Up @@ -74,7 +75,10 @@ def get_publish_name(self, path, sequence=False):
if version_pattern_match:
# found a version number, use the other groups to remove it
prefix = version_pattern_match.group(1)
extension = version_pattern_match.group(4) or ""
if len(version_pattern_match.groups()) == 5:
extension = version_pattern_match.group(5)
else:
extension = version_pattern_match.group(4) or ""
if extension:
publish_name = "%s.%s" % (prefix, extension)
else:
Expand Down

0 comments on commit f749c3c

Please sign in to comment.