Fix setting build number
authorDaniel Kos <daniel.kos@contractors.roche.com>
Tue, 21 Aug 2018 19:47:57 +0000 (21:47 +0200)
committerDaniel Kos <daniel.kos@contractors.roche.com>
Tue, 21 Aug 2018 19:47:57 +0000 (21:47 +0200)
No issue #

Arvados-DCO-1.1-Signed-off-by: Daniel Kos <daniel.kos@contractors.roche.com>

package.json
src/index.tsx

index b9484c5c0f644f0881527f60c885f2ea947e3f14..0e6435ebf536da29d695f224423f56780f4fca40 100644 (file)
@@ -27,7 +27,7 @@
   },
   "scripts": {
     "start": "react-scripts-ts start",
-    "build": "react-scripts-ts build",
+    "build": "REACT_APP_BUILD_NUMBER=$BUILD_NUMBER REACT_APP_GIT_COMMIT=$GIT_COMMIT react-scripts-ts build",
     "test": "react-scripts-ts test --env=jsdom",
     "eject": "react-scripts-ts eject",
     "lint": "tslint src/** -t verbose"
index b368d3f88f9cdf560f9f6c5a6b3340c23cf88d2a..bee08c80a7fa598d7ffd42ad87abd14335f872ef 100644 (file)
@@ -28,8 +28,8 @@ import { collectionFilesItemActionSet } from './views-components/context-menu/ac
 import { collectionActionSet } from './views-components/context-menu/action-sets/collection-action-set';
 import { collectionResourceActionSet } from './views-components/context-menu/action-sets/collection-resource-action-set';
 
-const getBuildNumber = () => "BN-" + (process.env.BUILD_NUMBER || "dev");
-const getGitCommit = () => "GIT-" + (process.env.GIT_COMMIT || "latest").substr(0, 7);
+const getBuildNumber = () => "BN-" + (process.env.REACT_APP_BUILD_NUMBER || "dev");
+const getGitCommit = () => "GIT-" + (process.env.REACT_APP_GIT_COMMIT || "latest").substr(0, 7);
 const getBuildInfo = () => getBuildNumber() + " / " + getGitCommit();
 
 const buildInfo = getBuildInfo();