chore: apply HFS+ compression to *.app in OS X (#715)

This results in ~10MB savings, which is not much, but still worth
reducing as much as we can.

See: https://github.com/resin-io/etcher/issues/711
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
This commit is contained in:
Juan Cruz Viotti 2016-09-23 14:11:42 -04:00 committed by GitHub
parent f9ce62d34f
commit 66a810e764
3 changed files with 12 additions and 0 deletions

View File

@ -44,6 +44,9 @@ install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
./scripts/build/linux.sh install x64; ./scripts/build/linux.sh install x64;
fi fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew install afsctool;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
./scripts/build/darwin.sh install; ./scripts/build/darwin.sh install;
fi fi

View File

@ -25,6 +25,7 @@ Prerequisites
### OS X ### OS X
- [XCode](https://developer.apple.com/xcode/) - [XCode](https://developer.apple.com/xcode/)
- [afsctool](https://brkirch.wordpress.com/afsctool/)
Cloning the project Cloning the project
------------------- -------------------

View File

@ -37,6 +37,11 @@ if ! command -v python 2>/dev/null; then
exit 1 exit 1
fi fi
if ! command -v afsctool 2>/dev/null; then
echo "Dependency missing: afsctool" 1>&2
exit 1
fi
if [ "$#" -ne 1 ]; then if [ "$#" -ne 1 ]; then
echo "Usage: $0 <command>" 1>&2 echo "Usage: $0 <command>" 1>&2
exit 1 exit 1
@ -194,6 +199,9 @@ function installer_dmg {
' | osascript ' | osascript
sync sync
# Apply HFS+ compression
afsctool -ci -9 $volume_app
sign $volume_app sign $volume_app
# Unmount temporal DMG image. # Unmount temporal DMG image.