Skip to content

Commit

Permalink
Merge pull request #94 from nspcc-dev/feature/63-add_website_version
Browse files Browse the repository at this point in the history
Add website version to the page
  • Loading branch information
roman-khimov authored Oct 11, 2023
2 parents 6a5ede0 + f72bbe3 commit 8354376
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

PORT = 3000
NODE_VERSION ?= 14
VERSION ?= "$(shell git describe --tags --match "v*" --abbrev=8 2>/dev/null | sed -r 's,^v([0-9]+\.[0-9]+)\.([0-9]+)(-.*)?$$,\1 \2 \3,' | while read mm patch suffix; do if [ -z "$$suffix" ]; then echo $$mm.$$patch; else patch=`expr $$patch + 1`; echo $$mm.$${patch}-pre$$suffix; fi; done)"

ifeq ($(shell uname), Linux)
STAT:=-u $(shell stat -c "%u:%g" .)
Expand Down Expand Up @@ -60,3 +61,6 @@ docker/%:
node:$(NODE_VERSION) sh -c 'make $*'

include help.mk

version:
@echo $(VERSION)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"scripts": {
"resolutions": "npx npm-force-resolutions && npm install -D [email protected]",
"start": "react-scripts start",
"start": "REACT_APP_VERSION=$(make version) react-scripts start",
"build": "BUILD_PATH='./output' react-scripts build",
"test": "jest --updateSnapshot",
"eject": "react-scripts eject"
Expand Down
9 changes: 9 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -1480,9 +1480,18 @@ export const App = () => {
weight="light"
subtitle
align="center"
style={{ marginBottom: 0 }}
>
NeoFS Panel
</Heading>
<Heading
size={7}
weight="light"
subtitle
align="center"
>
{process.env.REACT_APP_VERSION}
</Heading>
</Footer>
</>
);
Expand Down

0 comments on commit 8354376

Please sign in to comment.