Skip to content

Commit

Permalink
Add APP_UI_VERSION env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfdsilva committed Aug 25, 2023
1 parent 17952ab commit d3e0929
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/scripts/components/common/page-footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ function PageFooter(props) {
<ComponentOverride
with='pageFooter'
appVersion={process.env.APP_VERSION}
appUiVersion={process.env.APP_UI_VERSION}
appBuildTime={process.env.APP_BUILD_TIME}
>
<InfoList>
Expand Down Expand Up @@ -158,7 +159,7 @@ function PageFooter(props) {
content={`Released on ${format(
new Date(+process.env.APP_BUILD_TIME),
'PPPP'
)}`}
)} (veda-ui v${process.env.APP_VERSION}))`}
>
<span>v{process.env.APP_VERSION}</span>
</Tip>
Expand Down
3 changes: 3 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ const readPackage = () => JSON.parse(fs.readFileSync('package.json'));

// Set the version in an env variable.
process.env.APP_VERSION = readPackage().version;
process.env.APP_UI_VERSION = JSON.parse(
fs.readFileSync(path.join(__dirname, 'package.json'))
).version;
process.env.APP_BUILD_TIME = Date.now();

const parcelCli = path.join(__dirname, './node_modules/parcel/lib/cli.js');
Expand Down

0 comments on commit d3e0929

Please sign in to comment.