Update git.ts

This commit is contained in:
James Ives 2019-12-20 17:36:35 -05:00
parent 682d643fa8
commit 08b281c798

View File

@ -82,6 +82,21 @@ export async function deploy(): Promise<any> {
workspace workspace
); );
// Ensures that items that need to be excluded from the clean job get parsed.
let excludes = "";
if (action.clean && action.cleanExclude) {
try {
const excludedItems = JSON.parse(action.cleanExclude);
excludedItems.forEach(
(item: string) => (excludes += `--exclude ${item} `)
);
} catch {
console.log(
"There was an error parsing your CLEAN_EXCLUDE items. Please refer to the README for more details."
);
}
}
/* /*
Pushes all of the build files into the deployment directory. Pushes all of the build files into the deployment directory.
Allows the user to specify the root if '.' is provided. Allows the user to specify the root if '.' is provided.