Skip to content

Commit

Permalink
Apply Black formatting/linting.
Browse files Browse the repository at this point in the history
  • Loading branch information
dijksterhuis committed Nov 23, 2024
1 parent 95b3852 commit 42ec502
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions release.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

logging.basicConfig(
level=os.environ.get("LOG_LEVEL", "INFO"),
format="%(asctime)s ::: %(levelname)s ::: %(message)s"
format="%(asctime)s ::: %(levelname)s ::: %(message)s",
)

logger = logging.getLogger()
Expand All @@ -42,12 +42,15 @@
class LoggerManager:
def __init__(self, message):
self._message = message

def info(self, message):
logger.info(message)

def __enter__(self):
logger.info("="*80)
logger.info("=" * 80)
logger.info(f"Started: {self._message}")
return self

def __exit__(self, *args):
logger.info(f"Done: {self._message}")

Expand All @@ -58,7 +61,9 @@ def __exit__(self, *args):
RELEASE_DIR = Path(
os.environ.get("RELEASE_DIRPATH", "./release"),
)
PARADIGM_GITHUB_ZIP_URL = "https://github.com/Savage-Game-Design/Paradigm/archive/refs/heads/development.zip"
PARADIGM_GITHUB_ZIP_URL = (
"https://github.com/Savage-Game-Design/Paradigm/archive/refs/heads/development.zip"
)


def get_paradigm_development_files(paradir: Path) -> None:
Expand Down Expand Up @@ -130,7 +135,7 @@ def copy_dir_or_file(src: Path, dest: Path) -> None:
"*git*",
"*__pycache__*",
"*.py",
)
),
)
else:
shutil.copy2(
Expand Down Expand Up @@ -230,8 +235,8 @@ def main() -> None:

# copy mission files into build directory for ease of access
shutil.copytree(
src_missiondir,
build_missiondir,
src_missiondir,
build_missiondir,
dirs_exist_ok=True,
)
l.info(f"Copied common mision files.")
Expand Down Expand Up @@ -305,7 +310,7 @@ def main() -> None:

tag_name = mf_version
release_name = f"Mike Force: {mf_version}"
commit_summary = git.Repo('.').commit().summary
commit_summary = git.Repo(".").commit().summary

write_txt_to_file(
RELEASE_DIR.joinpath("tag_name.txt"),
Expand All @@ -325,8 +330,8 @@ def main() -> None:
)
l.info(f"Wrote commit summary file.")

logger.info("="*80)
logger.info("=" * 80)
logger.info(f"Release build completed.")


main()
main()

0 comments on commit 42ec502

Please sign in to comment.