Commit Graph

12 Commits

Author SHA1 Message Date
bd71b8ee14 fix(utils): handle file write failures with rollback
All checks were successful
Auto Changelog & Release / detect-version-change (push) Successful in 3s
Auto Changelog & Release / release (push) Has been skipped
Auto Changelog & Release / changelog-only (push) Successful in 5s
- Add error handling and rollback logic for unit file writes
- Prevent partial file writes by removing created files on failure
- Update tests to reflect new return type and error handling
2025-05-21 09:51:16 +02:00
403e047c0c feat(cli): use dynamic version retrieval
- Replace hardcoded version with dynamic retrieval using `getVersion`
- Improves maintainability by avoiding manual version updates
2025-05-21 03:47:14 +02:00
56fb554f13 feat(utils): add version retrieval utility
- Introduces a function to retrieve the application version
- Returns 'dev' if the version file is missing and 'unknown' for other errors
- Exports the new utility for use in other modules
2025-05-21 03:47:02 +02:00
f81bb53353 feat(generator): add systemctl usage instructions
All checks were successful
Auto Changelog & Release / detect-version-change (push) Successful in 3s
Auto Changelog & Release / release (push) Has been skipped
Auto Changelog & Release / changelog-only (push) Successful in 6s
- Log systemctl commands for user and root configurations
- Help users reload and enable timers more easily
2025-05-21 03:13:27 +02:00
97dc3fe23a feat(cli): add command to generate systemd unit files
- Introduces a CLI tool for creating systemd .timer and .service units
- Adds options for configuring unit names, commands, scheduling, and more
- Supports dry-run mode and user-level unit file generation
2025-05-21 03:01:21 +02:00
569b14d574 test(generate): add unit tests for service and timer generation
- Introduces tests to validate service and timer unit generation
- Covers description, dependencies, environment variables, and logging
- Ensures generated units meet expected configurations
2025-05-21 03:01:12 +02:00
316f3af04e refactor(utils): update import path for TimerOptions
- Adjusts the import path for TimerOptions to align with the new module structure.
- Simplifies dependency management by consolidating imports.
2025-05-21 03:01:03 +02:00
428e84927f feat(utils): export utility functions for filesystem and naming 2025-05-21 03:00:13 +02:00
ba4b933f78 feat(types): add TimerOptions interface for timer configuration 2025-05-21 02:58:53 +02:00
d5a383a62c feat(cli): add entry point for CLI commands 2025-05-21 02:58:30 +02:00
9539fe0532 feat(utils): add function to derive sanitized job names
- Introduces a utility function to extract and sanitize job names
  from executable paths by removing paths, extensions, and special
  characters.
- Adds unit tests to validate function behavior with various inputs.
2025-05-21 02:58:05 +02:00
ef2ac416d9 test(utils): add unit tests for systemd file handling
- Add tests for writing .service and .timer files with `writeUnitFiles`
- Add tests for resolving target paths with `resolveUnitTargetPath`
- Ensure proper file creation, content validation, and path resolution
2025-05-21 02:57:53 +02:00