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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(feat) O3-4215: Enable Environment Specification for Shell Builds #1211

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions packages/tooling/openmrs/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,11 @@ yargs.command(
describe:
"The locale to use as a default for this build of the app shell. Should be a value that's valid to use in an HTML lang attribute, e.g., en or en_GB.",
type: 'string',
})
.option('env', {
default: 'production',
describe: 'The environment to build for. e.g., development, production.',
type: 'string',
}),
async (args) =>
runCommand('runBuild', {
Expand Down
3 changes: 2 additions & 1 deletion packages/tooling/openmrs/src/commands/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export interface BuildArgs {
configUrls: Array<string>;
configPaths: Array<string>;
buildConfig?: string;
env: string;
}

export type BuildConfig = Partial<{
Expand Down Expand Up @@ -108,7 +109,7 @@ export async function runBuild(args: BuildArgs) {
const config = loadWebpackConfig({
importmap: importMap,
routes,
env: 'production',
env: args.env,
apiUrl: buildConfig.apiUrl || args.apiUrl,
configUrls: configUrls,
defaultLocale: args.defaultLocale || buildConfig.defaultLocale,
Expand Down
Loading