Skip to content

Commit

Permalink
Change prepublishToStaging to stage
Browse files Browse the repository at this point in the history
  • Loading branch information
MilapNaik committed Mar 20, 2024
1 parent d065bd5 commit 0f17569
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/RokuDeploy.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1477,7 +1477,7 @@ describe('index', () => {
});
});

describe('prepublishToStaging', () => {
describe('stage', () => {
it('should use outDir for staging folder', async () => {
await rokuDeploy.stage({
files: [
Expand Down
6 changes: 3 additions & 3 deletions src/cli.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@ describe('cli', () => {
expectPathExists(`${outDir}/roku-deploy.zip`);
});

it('Successfully runs prepublishToStaging', () => {
it('Successfully runs stage', () => {
//make the files
fsExtra.outputFileSync(`${rootDir}/source/main.brs`, '');

expect(() => {
execSync(`node ${cwd}/dist/cli.js prepublishToStaging --stagingDir ${stagingDir} --rootDir ${rootDir}`);
execSync(`node ${cwd}/dist/cli.js stage --stagingDir ${stagingDir} --rootDir ${rootDir}`);
}).to.not.throw();
});

it('Successfully copies rootDir folder to staging folder', () => {
fsExtra.outputFileSync(`${rootDir}/source/main.brs`, '');

execSync(`node ${cwd}/dist/cli.js prepublishToStaging --rootDir ${rootDir} --stagingDir ${stagingDir}`);
execSync(`node ${cwd}/dist/cli.js stage --rootDir ${rootDir} --stagingDir ${stagingDir}`);

expectPathExists(`${stagingDir}/source/main.brs`);
});
Expand Down
4 changes: 2 additions & 2 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as yargs from 'yargs';
import { ExecCommand } from './commands/ExecCommand';
import { SendTextCommand } from './commands/SendTextCommand';
import { PrepublishCommand } from './commands/PrepublishCommand';
import { StageCommand } from './commands/StageCommand';
import { ZipPackageCommand } from './commands/ZipPackageCommand';
import { SideloadCommand } from './commands/SideloadCommand';
import { ConvertToSquashfsCommand } from './commands/ConvertToSquashfsCommand';
Expand Down Expand Up @@ -149,7 +149,7 @@ void yargs
.option('stagingDir', { type: 'string', description: 'The selected staging folder', demandOption: false })
.option('rootDir', { type: 'string', description: 'The selected root folder to be copied', demandOption: false });
}, (args: any) => {
return new PrepublishCommand().run(args);
return new StageCommand().run(args);
})

.command(['zip', 'zipPackage'], 'Given an already-populated staging folder, create a zip archive of it and copy it to the output folder', (builder) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { rokuDeploy, util } from '../index';

export class PrepublishCommand {
export class StageCommand {
async run(args) {
let options = {
...util.getOptionsFromJson(args),
Expand Down

0 comments on commit 0f17569

Please sign in to comment.