fix(build): only install the fileicon module on macOS

This commit is contained in:
Jason Dreyzehner 2016-10-26 20:18:34 -04:00
commit 8115d15675
2 changed files with 3 additions and 1 deletions

View file

@ -116,6 +116,9 @@ mkdir /Volumes/"${VOL_NAME}"/.background
cp "${DMG_BACKGROUND_IMG}" /Volumes/"${VOL_NAME}"/.background/
echo "Adding volume icon to disk image"
# we install this here to avoid trying to install it on linux or windows, where
# it fails to install
npm install fileicon
# use fileicon node_module
cp "${DMG_VOLUME_ICON}" /Volumes/"${VOL_NAME}"/.VolumeIcon.icns
`npm bin`/fileicon set /Volumes/"${VOL_NAME}"/ /Volumes/"${VOL_NAME}"/.VolumeIcon.icns