mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
fix(scripts): make version injection failure fatal in build-dist.mjs
Previously, `scripts/build-dist.mjs` caught errors during version injection and logged them but allowed the build to complete with a success exit code. This masked issues in CI/CD environments (like 4everland) where version injection failed silently, leading to deployments without version hashes. This change modifies `injectVersionInfo` to `process.exit(1)` upon failure, ensuring that any issue with version injection halts the build pipeline and surfaces the error in the logs. Tested locally by simulating injection failure (verified exit code 1) and by running a standard build (verified success and correct injection). Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
83d8023767
commit
349fa11422
1 file changed
+1
-1
@@ -191,7 +191,7 @@ function injectVersionInfo() {
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Failed to inject version info:', error);
|
||||
// Continue even if injection fails, as it's not critical for functionality
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user