Skip to content

Commit ba9e164

Browse files
gabor-borosAdam Grandquist
authored andcommitted
Fixing pypi upload (#91)
* Fixing pypi upload * Fixing regexp to find patch group as well * Remove SHA part from the regexp due. Can't use PEP 440 local versions * Add post release capability
1 parent d9b8cdf commit ba9e164

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ install-db:
6666
upload-coverage:
6767
@sh scripts/upload-coverage.sh
6868

69-
upload-pypi:
69+
upload-pypi: prepare
7070
@sh scripts/upload-pypi.sh
7171

7272
clean:

setup.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,19 @@
3030
from rethinkdb.version import VERSION
3131

3232
RETHINKDB_VERSION_DESCRIBE = os.environ.get("RETHINKDB_VERSION_DESCRIBE")
33-
VERSION_RE = r"^v(?P<version>\d+\.\d+)\.0(-(?P<patch>\d+))?(-(?P<sha>\w+))?$"
33+
VERSION_RE = r"^v(?P<version>\d+\.\d+)\.(?P<patch>\d+)?(\.(?P<post>\w+))?$"
3434

3535
if RETHINKDB_VERSION_DESCRIBE:
3636
MATCH = re.match(VERSION_RE, RETHINKDB_VERSION_DESCRIBE)
3737

3838
if MATCH:
3939
VERSION = MATCH.group("version")
40+
4041
if MATCH.group("patch"):
4142
VERSION += "." + MATCH.group("patch")
42-
if MATCH.group("sha"):
43-
VERSION += "+" + MATCH.group("sha").lower()
43+
44+
if MATCH.group("post"):
45+
VERSION += "." + MATCH.group("post")
4446

4547
with open("rethinkdb/version.py", "w") as ostream:
4648
print("# Autogenerated version", file=ostream)

0 commit comments

Comments
 (0)