refactor(scripts): simplify path management and command execution

- Replaces hardcoded script paths with a reusable helper function
- Enhances command execution logic for flexibility and readability
- Improves maintainability by consolidating path construction logic
This commit is contained in:
2025-07-04 11:50:24 +02:00
parent 466c1c4918
commit 18b493d524
2 changed files with 21 additions and 10 deletions

4
dist/main.js vendored
View File

@@ -15,8 +15,8 @@ function setEnv(key, value) {
}
function main() {
const actionPath = process.env.GITHUB_ACTION_PATH || ".";
const script = path.join("./", "scripts/detect-version-change.sh");
const script = path.join(__dirname, "scripts", "detect-version-change.sh");
run(script);