|
|
|
|
@ -5,8 +5,8 @@ import { execSync } from "child_process";
@@ -5,8 +5,8 @@ import { execSync } from "child_process";
|
|
|
|
|
// Function to get the latest git tag
|
|
|
|
|
function getAppVersionString() { |
|
|
|
|
// if running in ci context, we can assume the package has been properly versioned
|
|
|
|
|
if (process.env.ALEXANDIRA_IS_CI_BUILD) { |
|
|
|
|
return process.env.npm_package_version; |
|
|
|
|
if (process.env.ALEXANDIRA_IS_CI_BUILD && process.env.npm_package_version && process.env.npm_package_version.trim() !== '') { |
|
|
|
|
return process.env.npm_package_version; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
@ -14,9 +14,7 @@ function getAppVersionString() {
@@ -14,9 +14,7 @@ function getAppVersionString() {
|
|
|
|
|
const tag = execSync('git describe --tags --abbrev=0').toString().trim(); |
|
|
|
|
return tag; |
|
|
|
|
} catch (error) { |
|
|
|
|
console.error("Failed to get git tag:", error); |
|
|
|
|
// Fallback to package version
|
|
|
|
|
return process.env.npm_package_version; |
|
|
|
|
return 'development'; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|