From 986b14467a08146c76b43decb6aa6f18287de42b Mon Sep 17 00:00:00 2001 From: David Michaels Date: Wed, 3 Jan 2024 12:03:56 -0500 Subject: [PATCH] Support for gitinfo.json --- CHANGELOG.rst | 7 +++++++ dcicutils/scripts/publish_to_pypi.py | 2 +- pyproject.toml | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 85c97e508..b947c1e31 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,13 @@ dcicutils Change Log ---------- +8.6.1 +===== +* Changed scripts/publish_to_pypi.py to allow untracked gitinfo.json to exist; + this so that we can (optionally) have repos write relevant git info to this + file (via GitHub Actions) and make it accessible to the package for inspection. + + 8.6.0 ===== * Minor fix to misc_utils.to_integer to handle float strings. diff --git a/dcicutils/scripts/publish_to_pypi.py b/dcicutils/scripts/publish_to_pypi.py index a454782b2..8b5bd7caf 100644 --- a/dcicutils/scripts/publish_to_pypi.py +++ b/dcicutils/scripts/publish_to_pypi.py @@ -197,7 +197,7 @@ def verify_untracked_files() -> bool: continue, and returns True for a yes response, otherwise returns False. """ untracked_files = get_untracked_files() - if untracked_files: + if untracked_files and not (len(untracked_files) == 1 and os.path.basename(untracked_files[0]) == "gitinfo.json"): PRINT(f"You are about to PUBLISH the following ({len(untracked_files)})" f" UNTRACKED file{'' if len(untracked_files) == 1 else 's' } -> SECURITY risk:") for untracked_file in untracked_files: diff --git a/pyproject.toml b/pyproject.toml index e7fa23cfc..59df600bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "dcicutils" -version = "8.6.0" +version = "8.6.0.1b1" # TODO: To become 8.6.1 description = "Utility package for interacting with the 4DN Data Portal and other 4DN resources" authors = ["4DN-DCIC Team "] license = "MIT"