Skip to content

Commit 6992d14

Browse files
committed
fix: skip icon build when no Figma changes
1 parent 82983af commit 6992d14

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/nimiq-icons/scripts/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ async function main() {
354354

355355
// Object to store all icon sets
356356
const results: Array<{ variant: string, iconSet: IconSet, package: string }> = []
357+
let hasAnyChanges = false
357358

358359
// Process all icon variants sequentially to properly handle caching
359360
for (const variant of Object.values(IconVariant)) {
@@ -400,6 +401,7 @@ async function main() {
400401
}
401402
else {
402403
// Process newly fetched icons
404+
hasAnyChanges = true
403405
const iconList = figma.iconSet.list()
404406
consola.info(`Fetched ${iconList.length} icons for ${variantName}`)
405407

@@ -414,6 +416,12 @@ async function main() {
414416
}
415417
}
416418

419+
// Skip package generation if no changes detected
420+
if (!hasAnyChanges) {
421+
consola.success('No icon changes detected. Skipping package generation.')
422+
return
423+
}
424+
417425
// Group icon sets by package
418426
const iconsByPackage: Record<string, IconSet[]> = {}
419427
results.forEach((result) => {

0 commit comments

Comments
 (0)