mirror of
https://github.com/dtomlinson91/panaetius.git
synced 2025-12-22 04:55:44 +00:00
bumping to v2.3.2
This commit is contained in:
34
duties.py
34
duties.py
@@ -139,3 +139,37 @@ def export(ctx):
|
|||||||
|
|
||||||
with requirements_dev.open("w", encoding="utf-8") as req:
|
with requirements_dev.open("w", encoding="utf-8") as req:
|
||||||
req.write(requirements_dev_content)
|
req.write(requirements_dev_content)
|
||||||
|
|
||||||
|
|
||||||
|
@duty
|
||||||
|
def publish(ctx, password:str):
|
||||||
|
"""
|
||||||
|
Publish the package to pypi.org.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
password (str): pypi.org password.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
`duty publish password=$my_password`
|
||||||
|
"""
|
||||||
|
dist_dir = pathlib.Path(".") / "dist"
|
||||||
|
rm_result = rm_tree(dist_dir)
|
||||||
|
print(rm_result)
|
||||||
|
|
||||||
|
publish_result = ctx.run(["poetry", "publish", "-u", "dtomlinson", "-p", password, "--build"])
|
||||||
|
print(publish_result)
|
||||||
|
|
||||||
|
|
||||||
|
def rm_tree(directory: pathlib.Path):
|
||||||
|
"""
|
||||||
|
Recursively delete a directory and all its contents.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
directory (pathlib.Path): The directory to delete.
|
||||||
|
"""
|
||||||
|
for child in directory.glob('*'):
|
||||||
|
if child.is_file():
|
||||||
|
child.unlink()
|
||||||
|
else:
|
||||||
|
rm_tree(child)
|
||||||
|
directory.rmdir()
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
"""Module containing the version of panaetius."""
|
"""Module containing the version of panaetius."""
|
||||||
|
|
||||||
__version__ = "2.3.1"
|
__version__ = "2.3.2"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "panaetius"
|
name = "panaetius"
|
||||||
version = "2.3.1"
|
version = "2.3.2"
|
||||||
description = "Python module to gracefully handle a .config file/environment variables for scripts, with built in masking for sensitive options. Provides a Splunk friendly formatted logger instance."
|
description = "Python module to gracefully handle a .config file/environment variables for scripts, with built in masking for sensitive options. Provides a Splunk friendly formatted logger instance."
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
authors = ["dtomlinson <dtomlinson@panaetius.co.uk>"]
|
authors = ["dtomlinson <dtomlinson@panaetius.co.uk>"]
|
||||||
|
|||||||
Reference in New Issue
Block a user