Skip to content

Commit

Permalink
fix: fixes after update
Browse files Browse the repository at this point in the history
  • Loading branch information
klaascuvelier committed Apr 29, 2022
1 parent 290d238 commit db5bc15
Show file tree
Hide file tree
Showing 5 changed files with 223 additions and 210 deletions.
2 changes: 1 addition & 1 deletion packages/nx-deno-deploy/src/executors/deploy/executor.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ExecutorContext } from '@nrwl/tao/src/shared/workspace';
import { ExecutorContext } from '@nrwl/devkit';
import { DeployExecutorSchema } from './schema';
import { deployProject } from '../../lib/deploy-ctl';
import { FsTree } from '@nrwl/tao/src/shared/tree';
Expand Down
2 changes: 1 addition & 1 deletion packages/nx-deno-deploy/src/executors/serve/executor.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ExecutorContext } from '@nrwl/tao/src/shared/workspace';
import { ExecutorContext } from '@nrwl/devkit';
import { FsTree } from '@nrwl/tao/src/shared/tree';
import { readProjectConfiguration } from '@nrwl/devkit';
import { runProject } from '../../lib/deploy-ctl';
Expand Down
2 changes: 1 addition & 1 deletion packages/nx-deno-deploy/src/executors/test/executor.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ExecutorContext } from '@nrwl/tao/src/shared/workspace';
import { ExecutorContext } from '@nrwl/devkit';
import { FsTree } from '@nrwl/tao/src/shared/tree';
import { readProjectConfiguration } from '@nrwl/devkit';
import { testProject } from '../../lib/deploy-ctl';
Expand Down
35 changes: 20 additions & 15 deletions packages/nx-netlify-deploy/src/executors/deploy/executor.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
import {ExecutorContext} from "@nrwl/tao/src/shared/workspace";
import {DeployExecutorSchema} from "./schema";
import {execSync} from "child_process";
import { ExecutorContext } from '@nrwl/devkit';
import { DeployExecutorSchema } from './schema';
import { execSync } from 'child_process';

export default async function deployExecutor(options: DeployExecutorSchema, context: ExecutorContext) {
const {siteId, skipBuild, prod, outputPath} = options;
export default async function deployExecutor(
options: DeployExecutorSchema,
context: ExecutorContext
) {
const { siteId, skipBuild, prod, outputPath } = options;

if (!skipBuild) {
console.log('Building app currently not supported');
}
if (!skipBuild) {
console.log('Building app currently not supported');
}

const command = `npx netlify deploy --dir=${outputPath} --site=${siteId} ${prod ? '--prod' : ''}`;
const command = `npx netlify deploy --dir=${outputPath} --site=${siteId} ${
prod ? '--prod' : ''
}`;

try {
execSync(command);
} catch (e) {
return {success: false, error: e.toString()}
}
try {
execSync(command);
} catch (e) {
return { success: false, error: e.toString() };
}

return { success: true };
return { success: true };
}
Loading

0 comments on commit db5bc15

Please sign in to comment.