Skip to content

Commit

Permalink
Merge pull request #5 from fugue-project/0.2.0.1
Browse files Browse the repository at this point in the history
Update release
  • Loading branch information
goodwanghan authored Nov 19, 2022
2 parents c00ac46 + 866cc14 commit 6df14ac
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
fugue_jupyter setup
"""
import json
import os
import sys
from pathlib import Path

Expand Down Expand Up @@ -33,16 +34,25 @@

long_description = (HERE / "README.md").read_text()

version = (
pkg_json["version"]
.replace("-alpha.", "a")
.replace("-beta.", "b")
.replace("-rc.", "rc")
)

def get_version() -> str:
version = (
pkg_json["version"]
.replace("-alpha.", "a")
.replace("-beta.", "b")
.replace("-rc.", "rc")
)
tag = os.environ.get("RELEASE_TAG", "")
if "dev" in tag.split(".")[-1]:
return tag
if tag != "":
assert tag == version, "release tag and version mismatch"
return version


setup_args = dict(
name=name,
version=version,
version=get_version(),
url=pkg_json["homepage"],
author=pkg_json["author"]["name"],
author_email=pkg_json["author"]["email"],
Expand Down

0 comments on commit 6df14ac

Please sign in to comment.