diff --git a/.env b/.env index f13ec52..39eede0 100644 --- a/.env +++ b/.env @@ -8,4 +8,4 @@ REACT_APP_CLIENT_URL=https://localhost:3000 ESLINT_NO_DEV_ERRORS=true TSC_COMPILE_ON_ERROR=true -REACT_APP_VERSION=${npm_package_version}-dev +REACT_APP_VERSION=${npm_package_version}-dev-${COMMIT_SHA} diff --git a/.env.production b/.env.production index 0454adf..e1a1b1a 100644 --- a/.env.production +++ b/.env.production @@ -1 +1 @@ -REACT_APP_VERSION=$npm_package_version +REACT_APP_VERSION=${npm_package_version}-${COMMIT_SHA} diff --git a/package.json b/package.json index 8524656..66ea83b 100644 --- a/package.json +++ b/package.json @@ -40,8 +40,8 @@ "workbox-streams": "^6.6.0" }, "scripts": { - "start": "HTTPS=true react-scripts start", - "build": "react-scripts build", + "start": "export HTTPS=true && export COMMIT_SHA=$(git rev-parse --short HEAD) && react-scripts start", + "build": "export COMMIT_SHA=$(git rev-parse --short HEAD) && react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject", "lint": "eslint --ext js,jsx,ts,tsx src/ && prettier --check src/",