2020-10-14 08:03:51 +00:00
|
|
|
from poetry_publish.publish import poetry_publish
|
|
|
|
from poetry_publish.utils.subprocess_utils import verbose_check_call
|
|
|
|
|
|
|
|
# https://github.com/jedie/PyInventory
|
|
|
|
import inventory
|
2023-07-21 05:50:19 +00:00
|
|
|
from inventory_project import PACKAGE_ROOT
|
2020-10-14 08:03:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
def publish():
|
|
|
|
"""
|
2023-07-21 05:50:19 +00:00
|
|
|
Publish to PyPi
|
|
|
|
Call this via:
|
|
|
|
$ poetry run publish
|
2020-10-14 08:03:51 +00:00
|
|
|
"""
|
2020-10-16 16:06:43 +00:00
|
|
|
verbose_check_call('make', 'pytest') # don't publish if tests fail
|
|
|
|
verbose_check_call('make', 'fix-code-style') # don't publish if code style wrong
|
2020-10-14 08:03:51 +00:00
|
|
|
|
|
|
|
poetry_publish(
|
|
|
|
package_root=PACKAGE_ROOT,
|
|
|
|
version=inventory.__version__,
|
|
|
|
)
|