Commit Graph

18 Commits

Author SHA1 Message Date
02760e5864 feat: package as pip-installable distribution
Turns the loose main.py into the 'swap-forge' distribution with a src layout, shipping both the swap-forge and the older swafo command.

A failing swap command no longer produces a traceback: CalledProcessError is caught and reported as "'mkswap' failed with exit code 1" at exit 1, a missing binary as exit 127. Required binaries are declared per filesystem path so an ext4 host is never asked for btrfs tooling.

The fstab entry is still written last, after swapon, so a failed activation leaves /etc/fstab untouched. The e2e suite proves that byte for byte across a create, a same-size rerun and a resize cycle, with real fallocate, chmod and file sizes.

Adds unit, integration and container-based e2e tests, ruff and markdown/mermaid linting, CodeQL and Dependabot, and pins the core metadata to 2.4 so twine accepts the artifacts.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 14:28:08 +02:00
e1eef73ae7 lint 2026-07-16 11:21:01 +02:00
fca1249033 Changed execution rights for main.py 2026-01-16 10:50:56 +01:00
8a41ce8e25 Replace Bash swapfile script with Python implementation using argparse
- Added btrfs-safe handling (/var/swap/swapfile)
- Automatically recreates swapfile if size differs
- Removed legacy main.sh
Conversation: https://chatgpt.com/share/68d2c38b-84dc-800f-9ca4-dffa158c8e80
2025-09-23 17:58:25 +02:00
e8c511d294 Added Funding 2025-03-12 20:52:47 +01:00
96a1dc58ae Merge branch 'main' of github.com:kevinveenbirkenbach/swap-forge 2025-03-12 11:14:39 +01:00
b633d908cb Update README.md 2025-03-12 10:49:37 +01:00
0af1e6ea42 Update README.md 2025-03-04 20:59:22 +01:00
71e34a32c7 Update README.md 2025-03-04 20:59:03 +01:00
10dee63d57 Update README.md 2025-03-04 20:58:29 +01:00
7c05c59cc5 Delete LICENSE 2025-03-04 20:58:09 +01:00
181bed3df7 Update README.md 2025-03-04 20:56:32 +01:00
0a363d227d Rename create-linux-swapfile.sh to main.sh 2025-03-04 20:56:00 +01:00
d68cc2c18e Update create-linux-swapfile.sh
Added size parameter
2022-08-18 18:00:44 +02:00
2133eaa94d Rename create-linux-swap-file.sh to create-linux-swapfile.sh 2022-08-18 17:32:52 +02:00
90fd46ccb2 Update README.md 2022-08-18 17:32:26 +02:00
2e2c4b4711 Create create-linux-swap-file.sh 2022-08-18 17:31:26 +02:00
5f9b70ea6a Initial commit 2022-08-18 17:30:19 +02:00