Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build for PyPi #641

Merged
merged 4 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,27 @@ jobs:
if: ${{ always() && steps.setup_credsweeper.conclusion == 'success' }}
run: |
# get actual version (major.minor) from credsweeper package
V=$(python -c "from packaging.version import Version as V; import credsweeper; v=V(credsweeper.__version__); print(f'{v.major}.{v.minor}')")
V=$(python -c "from packaging.version import Version as V; import credsweeper; v=V(credsweeper.__version__); print(f'{v.major}.{v.minor}');")
# check whether current version exists in the file
grep $V SECURITY.md
if ! grep $V SECURITY.md; then
echo $V
cat --number SECURITY.md
exit 1
fi

# # # Check version match in __init__.py and project.toml files

- name: Project version check
if: ${{ always() && steps.setup_credsweeper.conclusion == 'success' }}
run: |
# get full version from credsweeper package
V=$(python -c "from packaging.version import Version as V; import credsweeper; v=V(credsweeper.__version__); print(str(v));")
# check whether the exactly matched in project config
if ! grep "version = \"$V\"" pyproject.toml; then
echo $V
cat --number pyproject.toml
exit 1
fi

# # # from https://github.com/step-security-bot/CredSweeper/commit/dbc01f2709c56f69e2d8fd717156385f42b7bbf5

Expand Down
5 changes: 1 addition & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "credsweeper"
dynamic = ["version"]
version = "1.10.0"
description = "Credential Sweeper"
authors = [
]
Expand Down Expand Up @@ -52,9 +52,6 @@ Homepage = "https://github.com/Samsung/CredSweeper"
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.version]
path = "credsweeper/__init__.py"

[tool.hatch.build.targets.sdist]
ignore-vcs = true
only-include = ["/credsweeper"]
Expand Down
Loading