7.13.0macOn the Mac, I'm changing the icons that are in the build folder. When I package the app, the new icon is not being updated consistently across all of the output files.
Is there a build-cache somewhere that I need to delete?
I have tried deleting the Xcode/DerivedData but that makes no difference.
Thanks.
Do you mean that icon of your YourName.app in the Finder has old icon?
The build folder with the latest icon selected - looks like this:

The built dist folder after a build has this:

Which is a previous incarnation of the icon.
And the DMG when opened does have the latest version of the icon.

Furthermore, it's displaying differently on retina and non-retina screens:


I wonder if this is perhaps. the Finder caching things.
@philcockfield I did a bit of research on the topic - and it seems that your hunch was correct - see here for a potential fix for it!
I can confirm, that it is Finder cache issue — not your app or electron-builder issue.
Pulling a bunch of those suggestions together, I have this "nuke'em" set of commands:
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {};
sudo find /private/var/folders/ -name com.apple.iconservices -exec rm -rf {};
sudo rm -rf /Library/Caches/com.apple.iconservices.store
killall Dock
killall Finder
Not totally working - the DMG is still lagging behind, but some of the icons are now updating. Thanks everyone.
Help-wanted — electron-builder should not confuse users. Probably we should touch application executable to update cache.
What would be the file to touch?
In this case, would it be:
touch /<path>/dist/mac/Team DB.app
touch /<path>/dist/mac/Team DB.app/Contents/Info.plist

8.4.1+ will touch .app directory.
Awesome.