-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
290d238
commit db5bc15
Showing
5 changed files
with
223 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 20 additions & 15 deletions
35
packages/nx-netlify-deploy/src/executors/deploy/executor.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }; | ||
} |
Oops, something went wrong.