Skip to content

Commit

Permalink
Add build to valid semver.
Browse files Browse the repository at this point in the history
  • Loading branch information
VersusFacit committed Mar 21, 2024
1 parent 92b44f5 commit e7fd38f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ def _get_plugin_version_dict():
_version_path = os.path.join(this_directory, "dbt", "adapters", "snowflake", "__version__.py")
_semver = r"""(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)"""
_pre = r"""((?P<prekind>a|b|rc)(?P<pre>\d+))?"""
_build = r"""(\+build[0-9]+)?"""
_nightly = r"""(\.(?P<nightly>[a-z0-9]+)?)?"""
_version_pattern = rf"""version\s*=\s*["']{_semver}{_pre}{_nightly}["']"""
_version_pattern = rf"""version\s*=\s*["']{_semver}{_pre}{_build}{_nightly}["']"""
with open(_version_path) as f:
match = re.search(_version_pattern, f.read().strip())
if match is None:
Expand Down

0 comments on commit e7fd38f

Please sign in to comment.