},
"scripts": {
"start": "react-scripts-ts start",
- "build": "REACT_APP_BUILD_NUMBER=$BUILD_NUMBER REACT_APP_GIT_COMMIT=$GIT_COMMIT react-scripts-ts build",
+ "build": "REACT_APP_VERSION=$VERSION REACT_APP_BUILD_NUMBER=$BUILD_NUMBER REACT_APP_GIT_COMMIT=$GIT_COMMIT react-scripts-ts build",
"build-local": "react-scripts-ts build",
"test": "CI=true react-scripts-ts test --env=jsdom",
"test-local": "react-scripts-ts test --env=jsdom",
// 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;
+ }
+};