Skip to content

Commit

Permalink
Simplify major version detection
Browse files Browse the repository at this point in the history
Previously, running against versions with letters (such as beta) would
fail.
  • Loading branch information
petere committed Jul 2, 2020
1 parent cd27053 commit 8f29f2e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ uint--$(extension_version).sql: uint.sql hash.sql hex.sql operators.sql
PYTHON ?= python

operators.c operators.sql test/sql/operators.sql: generate.py
$(PYTHON) $< $(pg_version)
$(PYTHON) $< $(MAJORVERSION)

python-check: generate.py
pep8 $^
Expand Down
2 changes: 1 addition & 1 deletion generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -689,4 +689,4 @@ def main(pgversion):


if __name__ == '__main__':
main(pgversion=float(re.match(r'\d+\.\d+', sys.argv[1]).group(0)))
main(pgversion=float(sys.argv[1]))

0 comments on commit 8f29f2e

Please sign in to comment.