Skip to content

Commit

Permalink
Merge pull request #78 from ChannelFinder/display-package-json-version
Browse files Browse the repository at this point in the history
Update version in package.json and display on services page
  • Loading branch information
tynanford authored Oct 10, 2023
2 parents c155535 + 6023f1e commit a5a9198
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

REACT_APP_WEBSITE_NAME=PV Info
REACT_APP_WEBSITE_DESC=EPICS Controls PV Info
REACT_APP_VERSION=$npm_package_version

REACT_APP_ENDPOINT=/pvinfo
REACT_APP_DOMAIN=localhost
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pvinfo",
"homepage": "https://yourdomainhere/pvinfo",
"version": "1.0.0",
"version": "1.3.0",
"private": true,
"dependencies": {
"@emotion/react": "^11.9.0",
Expand Down
7 changes: 4 additions & 3 deletions src/components/services/Services.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,11 @@ function Services() {
return (
<Fragment>
<Box sx={{ display: "flex", flexDirection: "column" }}>
<Box sx={{ mb: 3, display: "flex", flexDirection: { xs: "column", sm: "row" }, alignItems: { xs: "start", sm: "end" }, justifyContent: "space-between" }}>
<Typography variant="h4" sx={{ fontWeight: "medium" }}>Services</Typography>
<Box sx={{ mb: 2, display: "flex", flexDirection: { xs: "column", sm: "row" }, alignItems: { xs: "start", sm: "start" }, justifyContent: "space-between" }}>
<Typography variant="h4" sx={{ fontWeight: "medium", mb: { xs: 1, sm: 0 } }}>Services</Typography>
<Box>
<Typography variant="body1"><Box component="span" sx={{ fontWeight: "medium" }}>PV Info Version:</Box> {gitInfo.commit.shortHash}</Typography>
<Typography variant="body1"><Box component="span" sx={{ fontWeight: "medium" }}>PV Info Version:</Box> {process.env.REACT_APP_VERSION}</Typography>
<Typography variant="body1"><Box component="span" sx={{ fontWeight: "medium" }}>Commit Hash:</Box> {gitInfo.commit.shortHash}</Typography>
<Typography variant="body1"><Box component="span" sx={{ fontWeight: "medium" }}>Commit Date:</Box> {new Date(gitInfo.commit.date).toLocaleDateString(undefined, { year: 'numeric', month: 'long', day: 'numeric' })}</Typography>
</Box>
</Box>
Expand Down

0 comments on commit a5a9198

Please sign in to comment.