Skip to content

Commit

Permalink
Include commit hash in app version
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasr8 committed Nov 24, 2023
1 parent 47d4393 commit db06487
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -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}
2 changes: 1 addition & 1 deletion .env.production
Original file line number Diff line number Diff line change
@@ -1 +1 @@
REACT_APP_VERSION=$npm_package_version
REACT_APP_VERSION=${npm_package_version}-${COMMIT_SHA}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/",
Expand Down

0 comments on commit db06487

Please sign in to comment.