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:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user