If a version number is supplied to the build command, make sure to report that
[arvados-workbench2.git] / src / common / app-info.ts
index cd274835685490a9fad76bc5050fa09daf8bb897..de6708eb636495e55eecd8fe3e5112546f92c2d5 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").substr(0, 7);
+      return getBuildNumber + " / " + getGitCommit;
+    }
+};