Skip to content

Commit

Permalink
Add version number
Browse files Browse the repository at this point in the history
  • Loading branch information
joao-vasconcelos committed Jul 15, 2024
1 parent 032526c commit 1de01f1
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 22 deletions.
2 changes: 2 additions & 0 deletions nextjs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ WORKDIR /app
COPY --from=dependencies /app/node_modules ./node_modules
COPY . .

RUN npx @helperkits/bumper bump

RUN npm run build


Expand Down
19 changes: 0 additions & 19 deletions nextjs/bump-version.js

This file was deleted.

10 changes: 10 additions & 0 deletions nextjs/components/AppVersion/AppVersion.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* * */

import styles from './AppVersion.module.css';
import pjson from '../../package.json';

/* * */

export default function AppVersion() {
return <p className={styles.container}>{pjson.version}</p>;
}
17 changes: 17 additions & 0 deletions nextjs/components/AppVersion/AppVersion.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* * */
/* CONTAINER */

.container {
width: 100%;
margin: 0 auto;
max-width: 1000px;
padding: 15px var(--size-lg) 30px var(--size-lg);
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: flex-start;
gap: 150px;
font-size: 10px;
font-weight: 600;
color: rgba(0, 0, 0, 0.25);
}
8 changes: 7 additions & 1 deletion nextjs/components/AppWrapper/AppWrapper.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
/* * */

import AppVersion from '../AppVersion/AppVersion';
import styles from './AppWrapper.module.css';

/* * */

export default function AppWrapper({ children }) {
return <div className={styles.container}>{children}</div>;
return (
<div className={styles.container}>
{children}
<AppVersion />
</div>
);
}
3 changes: 1 addition & 2 deletions nextjs/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"name": "@museudamulher/website",
"version": "2024.03.13-2223",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "next dev",
"bump": "node bump-version.js",
"build": "next build",
"start": "next start",
"lint": "next lint"
Expand Down

0 comments on commit 1de01f1

Please sign in to comment.