✨(version) convey version information to the /config endpoint and footer
We add the machinery to get version information and display it discreetly.
This commit is contained in:
committed by
Laurent Bossavit
parent
bbe8f32b96
commit
43c18cb4e6
@@ -23,6 +23,7 @@ describe('Page', () => {
|
||||
useConfigStore.setState({
|
||||
config: {
|
||||
RELEASE: '1.0.0',
|
||||
COMMIT: 'NA',
|
||||
FEATURES: { TEAMS_DISPLAY: true },
|
||||
LANGUAGES: [],
|
||||
},
|
||||
@@ -37,6 +38,7 @@ describe('Page', () => {
|
||||
useConfigStore.setState({
|
||||
config: {
|
||||
RELEASE: '1.0.0',
|
||||
COMMIT: 'NA',
|
||||
FEATURES: { TEAMS_DISPLAY: false },
|
||||
LANGUAGES: [],
|
||||
},
|
||||
|
||||
@@ -20,6 +20,7 @@ describe('MainLayout', () => {
|
||||
useConfigStore.setState({
|
||||
config: {
|
||||
RELEASE: '1.0.0',
|
||||
COMMIT: 'NA',
|
||||
FEATURES: { TEAMS_DISPLAY: true },
|
||||
LANGUAGES: [],
|
||||
},
|
||||
@@ -57,6 +58,7 @@ describe('MainLayout', () => {
|
||||
useConfigStore.setState({
|
||||
config: {
|
||||
RELEASE: '1.0.0',
|
||||
COMMIT: 'NA',
|
||||
FEATURES: { TEAMS_DISPLAY: true },
|
||||
LANGUAGES: [],
|
||||
},
|
||||
@@ -95,6 +97,7 @@ describe('MainLayout', () => {
|
||||
useConfigStore.setState({
|
||||
config: {
|
||||
RELEASE: '1.0.0',
|
||||
COMMIT: 'NA',
|
||||
FEATURES: { TEAMS_DISPLAY: false },
|
||||
LANGUAGES: [],
|
||||
},
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
export interface Config {
|
||||
LANGUAGES: [string, string][];
|
||||
RELEASE: string;
|
||||
COMMIT: string;
|
||||
FEATURES: {
|
||||
TEAMS_DISPLAY: boolean;
|
||||
};
|
||||
|
||||
@@ -5,6 +5,8 @@ import styled from 'styled-components';
|
||||
import { Box, LogoGouv, StyledLink, Text } from '@/components';
|
||||
import { useConfigStore } from '@/core';
|
||||
|
||||
import frontVersion from '../../../version.json';
|
||||
|
||||
import IconLink from './assets/external-link.svg';
|
||||
|
||||
const BlueStripe = styled.div`
|
||||
@@ -141,6 +143,11 @@ export const Footer = () => {
|
||||
))}
|
||||
</Box>
|
||||
|
||||
<Text as="p" aria-hidden="true" $css="display: none">
|
||||
You have found the hidden app version information ! Well done ! back
|
||||
commit is: {config?.COMMIT}; front commit is: {frontVersion?.commit}
|
||||
</Text>
|
||||
|
||||
<Text
|
||||
as="p"
|
||||
$size="m"
|
||||
|
||||
6
src/frontend/apps/desk/version.json
Normal file
6
src/frontend/apps/desk/version.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"source":"people",
|
||||
"version":"version",
|
||||
"commit":"commit",
|
||||
"build": "NA"
|
||||
}
|
||||
@@ -20,6 +20,7 @@ test.describe('Config', () => {
|
||||
['en-us', 'English'],
|
||||
['fr-fr', 'French'],
|
||||
],
|
||||
COMMIT: 'NA',
|
||||
FEATURES: {
|
||||
CONTACTS_CREATE: true,
|
||||
CONTACTS_DISPLAY: true,
|
||||
|
||||
Reference in New Issue
Block a user