Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: deploy to heroku workflow #216

Merged
merged 1 commit into from
Feb 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: deploy to heroku workflow
  • Loading branch information
jamesgeorge007 committed Feb 28, 2021
commit 470e4d38bcb1dd85684e151c6cf09fc046e5635f
6 changes: 3 additions & 3 deletions src/commands/deploy/heroku.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import inquirer from 'inquirer';
import path from 'path';

import * as logger from '../../utils/logger';
import { fetchProjectConfig, readFileContent } from '../../utils/helpers';
import { fetchProjectConfig } from '../../utils/helpers';
import { validateInput, validateInstallation } from '../../utils/validate';

/**
Expand Down Expand Up @@ -163,7 +163,7 @@ export default async (templateDir) => {
];

let pkgJson = JSON.parse(
readFileContent(path.join('client', 'package.json')),
fs.readFileSync(path.join('client', 'package.json'), 'utf8'),
);
const buildCmd = 'npm run build';
const postInstallScript = `if test \"$NODE_ENV\" = \"production\" ; then ${buildCmd} ; fi `; // eslint-disable-line
Expand Down Expand Up @@ -193,7 +193,7 @@ export default async (templateDir) => {
}

await execa.command('git add .', { cwd: templateDir });
await execa.command(`git commit -m "Add files"`, { cwd: templateDir });
await execa('git', ['commit', '-m', 'Add files'], { cwd: templateDir });

await execa.command('git push heroku master', {
stdio: 'inherit',
Expand Down