Skip to content

Commit 26f0940

Browse files
committed
mrt env cleanup
1 parent a537873 commit 26f0940

11 files changed

Lines changed: 101 additions & 289 deletions

File tree

cli

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
#!/usr/bin/env sh
22
# simple wrapper to the ./packages/b2c-cli/bin/dev.js script
3-
(cd ./packages/b2c-cli && ./bin/dev.js "$@")
3+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
4+
(cd "$SCRIPT_DIR/packages/b2c-cli" && ./bin/dev.js "$@")

packages/b2c-cli/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
**/.DS_Store
44
/.idea
55
/dist
6+
/build
67
/tmp
78
/node_modules
89
oclif.manifest.json

packages/b2c-cli/src/commands/mrt/env-var/delete.ts

Lines changed: 0 additions & 68 deletions
This file was deleted.

packages/b2c-cli/src/commands/mrt/env-var/list.ts

Lines changed: 0 additions & 88 deletions
This file was deleted.

packages/b2c-cli/src/commands/mrt/env-var/set.ts

Lines changed: 0 additions & 107 deletions
This file was deleted.

packages/b2c-cli/src/commands/mrt/push.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,6 @@ export default class MrtPush extends MrtCommand<typeof MrtPush> {
4343

4444
static flags = {
4545
...MrtCommand.baseFlags,
46-
project: Flags.string({
47-
char: 'p',
48-
description: 'MRT project slug',
49-
required: true,
50-
}),
51-
environment: Flags.string({
52-
char: 'e',
53-
description: 'Environment to deploy to after push (e.g., staging, production)',
54-
}),
5546
message: Flags.string({
5647
char: 'm',
5748
description: 'Bundle message/description',
@@ -83,7 +74,15 @@ export default class MrtPush extends MrtCommand<typeof MrtPush> {
8374
async run(): Promise<PushResult> {
8475
this.requireMrtCredentials();
8576

86-
const {project, environment: target, message} = this.flags;
77+
const {mrtProject: project, mrtEnvironment: target} = this.resolvedConfig;
78+
const {message} = this.flags;
79+
80+
if (!project) {
81+
this.error(
82+
'MRT project is required. Provide --project flag, set SFCC_MRT_PROJECT, or set mrtProject in dw.json.',
83+
);
84+
}
85+
8786
const buildDir = this.flags['build-dir'];
8887
const ssrOnly = this.flags['ssr-only'].split(',').map((s) => s.trim());
8988
const ssrShared = this.flags['ssr-shared'].split(',').map((s) => s.trim());

0 commit comments

Comments
 (0)