Skip to content

Commit

Permalink
Use shared version_bump automation script (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel authored Feb 23, 2023
1 parent 5ad4908 commit af5b0bd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 48 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/publish_test_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ jobs:
build_and_publish_pypi:
uses: neongeckocom/.github/.github/workflows/publish_alpha_release.yml@master
secrets: inherit
with:
version_file: "version.py"
9 changes: 6 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@
from os import path, getenv


BASE_PATH = path.abspath(path.dirname(__file__))


def get_requirements(requirements_filename: str):
requirements_file = path.join(path.abspath(path.dirname(__file__)), "requirements", requirements_filename)
requirements_file = path.join(BASE_PATH, "requirements", requirements_filename)
with open(requirements_file, 'r', encoding='utf-8') as r:
requirements = r.readlines()
requirements = [r.strip() for r in requirements if r.strip() and not r.strip().startswith("#")]
Expand All @@ -35,10 +38,10 @@ def get_requirements(requirements_filename: str):
return requirements


with open("README.md", "r") as f:
with open(path.join(BASE_PATH, "README.md"), "r") as f:
long_description = f.read()

with open("./version.py", "r", encoding="utf-8") as v:
with open(path.join(BASE_PATH, "version.py"), "r", encoding="utf-8") as v:
for line in v.readlines():
if line.startswith("__version__"):
if '"' in line:
Expand Down
45 changes: 0 additions & 45 deletions version_bump.py

This file was deleted.

0 comments on commit af5b0bd

Please sign in to comment.