Skip to content

Commit

Permalink
[DOP-4033]: Remove unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
branberry committed Oct 3, 2023
1 parent d6798e3 commit 66bd820
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/commands/src/shared/next-gen-deploy.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import fs from 'fs';
import path from 'path';
import { promisify } from 'util';
import { executeAndPipeCommands, executeCliCommand, getCommitBranch, getRepoDir } from '../helpers';
import { executeAndPipeCommands, executeCliCommand } from '../helpers';

const existsAsync = promisify(fs.exists);

export async function nextGenDeploy({ repoName }) {
const repoDir = getRepoDir(repoName);
interface NextGenDeployParams {
bucket: string;
mutPrefix: string;
gitBranch: string;
}

const [hasConfigRedirects, gitBranch] = await Promise.all([
existsAsync(path.join(process.cwd(), 'config/redirects')),
getCommitBranch(repoDir),
]);
export async function nextGenDeploy({ bucket, mutPrefix, gitBranch }: NextGenDeployParams) {
const hasConfigRedirects = await existsAsync(path.join(process.cwd(), 'config/redirects'));

if (hasConfigRedirects && (gitBranch === 'main' || gitBranch === 'master')) {
// mut-redirects config/redirects -o public/.htaccess

await executeCliCommand({ command: 'mut-redirects', args: ['config/redirects', '-o', 'public/.htaccess'] });
}

Expand Down

0 comments on commit 66bd820

Please sign in to comment.