Skip to content

Commit

Permalink
Support for gitinfo.json
Browse files Browse the repository at this point in the history
  • Loading branch information
dmichaels-harvard committed Jan 3, 2024
1 parent 986b144 commit 68d3be3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion dcicutils/scripts/publish_to_pypi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 and not (len(untracked_files) == 1 and os.path.basename(untracked_files[0]) == "gitinfo.json"):
if untracked_files:
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:
Expand Down Expand Up @@ -243,6 +243,9 @@ def get_untracked_files() -> list:
# Ignore any __pycache__ directories as they are already ignored by poetry publish.
if os.path.isdir(untracked_file) and os.path.basename(untracked_file.rstrip("/")) == "__pycache__":
continue
# Ignore gitinfo.json which may exist if the repo wants to create this via GitHub Actions.
if os.path.basename(untracked_file) == "gitinfo.json":
continue
untracked_files.append(untracked_file)
return untracked_files

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "dcicutils"
version = "8.6.0.1b1" # TODO: To become 8.6.1
version = "8.6.0.1b2" # TODO: To become 8.6.1
description = "Utility package for interacting with the 4DN Data Portal and other 4DN resources"
authors = ["4DN-DCIC Team <support@4dnucleome.org>"]
license = "MIT"
Expand Down

0 comments on commit 68d3be3

Please sign in to comment.