diff --git a/.github/fetch_icons/index.js b/.github/fetch_icons/index.js index 61164312..0094f606 100644 --- a/.github/fetch_icons/index.js +++ b/.github/fetch_icons/index.js @@ -39,7 +39,7 @@ try { } console.log("Files changed", filesChanged); - core.setOutput("files_changed", filesChanged); + core.setOutput("files_changed", false); //TODO: Luke change this } catch (error) { core.setFailed(error.message); } diff --git a/scripts/fetch-icons/fetchIcons.ts b/scripts/fetch-icons/fetchIcons.ts index 9b4b23b5..2c048a5c 100644 --- a/scripts/fetch-icons/fetchIcons.ts +++ b/scripts/fetch-icons/fetchIcons.ts @@ -92,7 +92,7 @@ export default async function main( generateDefinitionFiles(outputDir, generateFontResult, manifest); console.log("✅ - Generated definition files."); - generatePNGs(iconsOutputDir, pngOutputDir, categoryNames); + await generatePNGs(iconsOutputDir, pngOutputDir, categoryNames); console.log("✅ - Generated PNGs."); console.log("✅ - Done - Icons updated!"); diff --git a/scripts/fetch-icons/generators/generatePNGs.ts b/scripts/fetch-icons/generators/generatePNGs.ts index 4fed9103..53bb11bf 100644 --- a/scripts/fetch-icons/generators/generatePNGs.ts +++ b/scripts/fetch-icons/generators/generatePNGs.ts @@ -8,7 +8,7 @@ import { createFolder } from "../../utils/fileUtils.js"; * @param {string} outputDir - Location to save PNG files * @param {string[]} categories - List of all icon categories. */ -export const generatePNGs = (inputDir: string, outputDir: string, categories: string[]) => { +export const generatePNGs = async (inputDir: string, outputDir: string, categories: string[]) => { createFolder(outputDir); for (const cat of categories) { @@ -17,7 +17,7 @@ export const generatePNGs = (inputDir: string, outputDir: string, categories: st for (const svg of svgDirs) { const split = svg.split("/"); const name = split.pop()?.slice(0, -3); - sharp(inputDir + "/" + cat + "/" + svg) + await sharp(inputDir + "/" + cat + "/" + svg) .resize(512) .modulate({ lightness: 44 }) .png() diff --git a/scripts/utils/checkGit.ts b/scripts/utils/checkGit.ts index 3545354e..e137e5e4 100644 --- a/scripts/utils/checkGit.ts +++ b/scripts/utils/checkGit.ts @@ -5,9 +5,11 @@ import { execSync } from "child_process"; * @returns string[] - List of files that have changed */ const getAllChangedFiles = (): string[] => { + console.log("git diff HEAD"); + console.log(execSync(`git diff HEAD`).toString()); const diffOutput = execSync(`git diff HEAD --name-only`).toString(); if (diffOutput != "") { - console.log("Files changed:", diffOutput); + // console.log("Files changed:", diffOutput); } return diffOutput.toString().split("\n").filter(Boolean); };