18881: Fixes process state indicator, with tests.
[arvados-workbench2.git] / src / common / app-info.ts
index cd274835685490a9fad76bc5050fa09daf8bb897..a6e3af744d74f26cbe0f27086a6049f9f2034d51 100644 (file)
@@ -3,7 +3,11 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 export const getBuildInfo = (): string => {
-    const getBuildNumber = "BN-" + (process.env.REACT_APP_BUILD_NUMBER || "dev");
-    const getGitCommit = "GIT-" + (process.env.REACT_APP_GIT_COMMIT || "latest").substr(0, 7);
-    return getBuildNumber + " / " + getGitCommit;
-};
\ No newline at end of file
+    if (process.env.REACT_APP_VERSION) {
+      return "v" + process.env.REACT_APP_VERSION;
+    } else {
+      const getBuildNumber = "BN-" + (process.env.REACT_APP_BUILD_NUMBER || "dev");
+      const getGitCommit = "GIT-" + (process.env.REACT_APP_GIT_COMMIT || "latest").substring(0, 7);
+      return getBuildNumber + " / " + getGitCommit;
+    }
+};