fix: Use pkg version until semantic-release is used (#1565)

* fix: Use pkg version until semantic-release is used

* Make istanbul happy with coverage
This commit is contained in:
Dermot Duffy authored and GitHub committed 2024-09-22 12:55:44 -07:00
1 parent c63d11a2e9
commit 716a33fb96
2 files changed
+16 -9

No files matched your search

+8 -2
View File
@@ -14,11 +14,17 @@ interface GitDiagnostics {
export const getReleaseVersion = (): string => {
const releaseVersion = '__FRIGATE_CARD_RELEASE_VERSION__';
/* istanbul ignore if: this path cannot be reached during tests as the value
is substituted by rollup -- @preserve */
/* istanbul ignore if: depends on rollup substitution -- @preserve */
if ((releaseVersion as unknown) === 'pkg') {
return pkg.version;
}
/* istanbul ignore if: depends on rollup substitution -- @preserve */
if ((releaseVersion as unknown) === 'dev') {
return `${releaseVersion}+${pkg['gitAbbrevHash']} (${pkg['buildDate']})`;
}
return releaseVersion;
};