Compare commits
11 Commits
trigger_re
...
remove_act
| Author | SHA1 | Date | |
|---|---|---|---|
| ac32bae975 | |||
|
|
b181e31a0c | ||
| 4fd1243472 | |||
|
|
328eeaca7a | ||
| 19b79b26ff | |||
|
|
a67e31c65d | ||
| 9d4608bd34 | |||
|
|
27468ae0d0 | ||
| 8b1d9a81a1 | |||
| 6eb3f5a210 | |||
|
|
9a64bef661 |
48
.github/workflows/publish.yml
vendored
48
.github/workflows/publish.yml
vendored
@@ -1,48 +0,0 @@
|
||||
name: Publish to PyPI
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
|
||||
jobs:
|
||||
build-publish:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- name: Install Poetry
|
||||
uses: snok/install-poetry@v1
|
||||
with:
|
||||
version: 1.8.4
|
||||
|
||||
- name: Install dependencies
|
||||
run: poetry install --no-root --only main
|
||||
|
||||
- name: Build package
|
||||
run: poetry build
|
||||
|
||||
- name: Generate checksums
|
||||
run: |
|
||||
cd dist
|
||||
for file in *; do
|
||||
sha256sum "$file" > "$file.sha256"
|
||||
done
|
||||
|
||||
- name: Publish to PyPI
|
||||
env:
|
||||
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
|
||||
run: poetry publish
|
||||
|
||||
- name: Upload artifacts to GitHub Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: |
|
||||
dist/*
|
||||
18
.github/workflows/release-please.yml
vendored
18
.github/workflows/release-please.yml
vendored
@@ -1,18 +0,0 @@
|
||||
name: Release Please
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
release-please:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Release Please
|
||||
uses: googleapis/release-please-action@v4
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,3 +1,3 @@
|
||||
__pycache__
|
||||
.pytest_cache
|
||||
dist
|
||||
dist
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
".": "0.1.1"
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"release-type": "python",
|
||||
"package-name": "resrm",
|
||||
"changelog-sections": [
|
||||
{ "type": "feat", "section": "Added", "hidden": false },
|
||||
{ "type": "fix", "section": "Fixed", "hidden": false },
|
||||
{ "type": "refactor", "section": "Changed", "hidden": false },
|
||||
{ "type": "perf", "section": "Changed", "hidden": false },
|
||||
{ "type": "docs", "section": "Documentation", "hidden": false }
|
||||
]
|
||||
}
|
||||
@@ -244,7 +244,7 @@ def move_to_trash(path: Path, interactive: bool, force: bool, recursive: bool, p
|
||||
print(f"Failed permanent delete: {e}")
|
||||
return
|
||||
|
||||
# 🚫 Prevent non-root user deleting root-owned files
|
||||
# Prevent non-root user deleting root-owned files
|
||||
try:
|
||||
st = path.stat()
|
||||
if st.st_uid == 0 and os.geteuid() != 0:
|
||||
@@ -253,7 +253,7 @@ def move_to_trash(path: Path, interactive: bool, force: bool, recursive: bool, p
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# 🧭 Detect which trash to use (based on file owner)
|
||||
# Detect which trash to use (based on file owner)
|
||||
try:
|
||||
import pwd
|
||||
owner_uid = path.stat().st_uid
|
||||
|
||||
Reference in New Issue
Block a user