Skip to content

Commit

Permalink
gitignore temporary crds
Browse files Browse the repository at this point in the history
  • Loading branch information
Oyelowo committed Oct 8, 2022
1 parent 99a517a commit 36353ad
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion kubernetes/scripts/utils/syncCrdsCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ import waitOn from 'wait-on';
export async function syncCrdsCode() {
const outDir = getGeneratedCrdsCodeDir();
sh.rm('-rf', outDir);
const tempCrdDir = path.join(outDir, 'xxxxcrds');
const crdPathName = '@oyelowo-crds';
const tempCrdDir = path.join(outDir, crdPathName);
sh.exec(`mkdir -p '${tempCrdDir}'`, { silent: true });

sh.exec(`echo '${crdPathName}' >> ${path.join(outDir, '.gitignore')}`);

const crdFilesPaths: string[] = [];

Object.entries(helmChartsInfo).forEach(([repoName, { repo, charts }]) => {
Expand Down Expand Up @@ -76,4 +80,5 @@ export async function syncCrdsCode() {
} catch (error) {
throw new Error(chalk.redBright`Problem generating crd codes. Error: ${error}`);
}
sh.exec(`rm -rf ${tempCrdDir}`);
}

0 comments on commit 36353ad

Please sign in to comment.