Skip to content

Commit

Permalink
feat: Add custom gcp code
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasdao committed Jan 20, 2018
1 parent 802007d commit 0633599
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/nowflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
const path = require('path')
require('colors')
const { writeToFile, deleteFile } = require('./utilities').files
const configFileManager = require('./util/config-files')
const gcpDeploy = require('./providers/gcp/deploy')
const awsDeploy = require('./providers/aws/deploy')

/*eslint-disable */
const getAbsPath = relativePath => path.join(process.cwd(), relativePath)
Expand Down Expand Up @@ -228,8 +231,16 @@ const deploy = (env='default', noalias=false) => {
.then(() => {
if (!nowUpdate.err && !pkgUpdate.err) {
try {
if (nowUpdate.hostingType == 'gcp')
require('child_process').execSync('now gcp', { stdio: 'inherit' })
if (nowUpdate.hostingType == 'gcp') {
const deployConfig = {
config: configFileManager.readConfigFile(),
authConfig: configFileManager.readAuthConfigFile(),
argv: configFileManager.readLocalConfig()
}
gcpDeploy(deployConfig)

//require('child_process').execSync('now gcp', { stdio: 'inherit' })
}
else
require('child_process').execSync('now', { stdio: 'inherit' })
}
Expand Down

0 comments on commit 0633599

Please sign in to comment.