Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: provide the app's name & version to the <HeaderBar> #674

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat(shell): add app version to env vars
  • Loading branch information
Mohammer5 committed Sep 30, 2021
commit 7f5617e3b6b38898f8af9cb7bd73f5dc5a87e695
1 change: 1 addition & 0 deletions cli/src/lib/shell/getAppInfos.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = ({ title, version }) => ({ name: title, version })
7 changes: 4 additions & 3 deletions cli/src/lib/shell/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const { exec } = require('@dhis2/cli-helpers-engine')
const { getPWAEnvVars } = require('../pwa')
const bootstrap = require('./bootstrap')
const getEnv = require('./env')
const getAppInfos = require('./getAppInfos')

module.exports = ({ config, paths }) => ({
bootstrap: async (args = {}) => {
Expand All @@ -16,7 +17,7 @@ module.exports = ({ config, paths }) => ({
cmd: 'yarn',
args: ['run', 'build'],
cwd: paths.shell,
env: getEnv({ name: config.title, ...getPWAEnvVars(config) }),
env: getEnv({ ...getAppInfos(config), ...getPWAEnvVars(config) }),
pipe: false,
})
},
Expand All @@ -25,7 +26,7 @@ module.exports = ({ config, paths }) => ({
cmd: 'yarn',
args: ['run', 'start'],
cwd: paths.shell,
env: getEnv({ name: config.title, port, ...getPWAEnvVars(config) }),
env: getEnv({ ...getAppInfos(config), port, ...getPWAEnvVars(config) }),
pipe: false,
})
},
Expand All @@ -34,7 +35,7 @@ module.exports = ({ config, paths }) => ({
cmd: 'yarn',
args: ['run', 'test', '--', '--all'],
cwd: paths.shell,
env: getEnv({ name: config.title }),
env: getEnv({ ...getAppInfos(config) }),
pipe: true,
})
},
Expand Down