Skip to content

Commit

Permalink
[FEATURE] 서비스 버전 표기 (#31)
Browse files Browse the repository at this point in the history
* chore: 버전 수정 (#29)

* feat: 서비스 버전 환경변수 설정 (#29)

* feat: 서비스 버전 표기 (#29)

* test: 서비스 버전 표기 테스트 (#31)

* feat: 서비스 버전 표기 완료 (#29)
  • Loading branch information
hyunmin0317 authored Nov 13, 2024
1 parent 4455a38 commit cd5ab05
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "smunity-web",
"version": "0.1.0",
"version": "1.0.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.17.0",
Expand All @@ -21,10 +21,11 @@
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"start": "npm run version && react-scripts start",
"build": "npm run version && react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
"eject": "react-scripts eject",
"version": "echo REACT_APP_VERSION=$(git describe --tags --abbrev=0) > .env && echo REACT_APP_COMMIT_HASH=$(git rev-parse --short HEAD) >> .env"
},
"eslintConfig": {
"extends": [
Expand Down
20 changes: 19 additions & 1 deletion src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,25 @@ const Footer = () => {
이용약관
</Link>
</h4>
<h4>Copyright ⓒ Smunity</h4>
<h4>
Copyright ⓒ Smunity{' '}
<a
href={`https://github.com/smu-nity/smunity-web/releases/tag/${process.env.REACT_APP_VERSION}`}
className="footer_link"
target="_blank"
rel="noreferrer">
{process.env.REACT_APP_VERSION}
</a>{' '}
(
<a
href={`https://github.com/smu-nity/smunity-web/commit/${process.env.REACT_APP_COMMIT_HASH}`}
className="footer_link"
target="_blank"
rel="noreferrer">
{process.env.REACT_APP_COMMIT_HASH}
</a>
)
</h4>
</div>
</footer>
)
Expand Down

0 comments on commit cd5ab05

Please sign in to comment.