Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Oct 23, 2024
1 parent 43cf678 commit d27f63f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/fetch_icons/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
2 changes: 1 addition & 1 deletion scripts/fetch-icons/fetchIcons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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!");
Expand Down
4 changes: 2 additions & 2 deletions scripts/fetch-icons/generators/generatePNGs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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()
Expand Down
4 changes: 3 additions & 1 deletion scripts/utils/checkGit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
Expand Down

0 comments on commit d27f63f

Please sign in to comment.