2013-04-14 14:09:40 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-04-20 14:34:12 +08:00
|
|
|
VERSION=`git describe --always --dirty 2>/dev/null`
|
2013-04-14 14:09:40 +08:00
|
|
|
if test -z "$VERSION" ; then
|
2016-04-20 14:34:12 +08:00
|
|
|
echo "Could not get version from git"
|
|
|
|
VERSION=`sed -E -n 's/^.*PACKAGE_VERSION "([0-9a-z.\-]+)"/\1/p' osx/config.h`
|
|
|
|
if test -z "$VERSION"; then
|
|
|
|
echo "Could not get version from osx/config.h"
|
|
|
|
exit 1
|
|
|
|
fi
|
2013-04-14 14:09:40 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Version is $VERSION"
|
|
|
|
|
|
|
|
set -x
|
2012-05-10 17:11:28 +08:00
|
|
|
|
2012-05-30 15:27:50 +08:00
|
|
|
make distclean
|
2013-04-13 16:59:07 +08:00
|
|
|
rm -Rf /tmp/fish_pkg
|
2012-05-30 15:27:50 +08:00
|
|
|
|
2013-04-14 14:09:40 +08:00
|
|
|
#Exit on error
|
|
|
|
set -e
|
|
|
|
|
|
|
|
mkdir -p /tmp/fish_pkg/root /tmp/fish_pkg/intermediates /tmp/fish_pkg/dst
|
2013-04-13 16:59:07 +08:00
|
|
|
xcodebuild install -scheme install_tree -configuration Release DSTROOT=/tmp/fish_pkg/root/
|
2013-04-14 14:09:40 +08:00
|
|
|
pkgbuild --scripts build_tools/osx_package_scripts --root /tmp/fish_pkg/root/ --identifier 'com.ridiculousfish.fish-shell-pkg' --version "$VERSION" /tmp/fish_pkg/intermediates/fish.pkg
|
2012-05-30 15:27:50 +08:00
|
|
|
|
2016-04-20 14:34:12 +08:00
|
|
|
productbuild --package-path /tmp/fish_pkg/intermediates --distribution build_tools/osx_distribution.xml --resources build_tools/osx_package_resources/ ~/fish_built/fish-$VERSION.pkg
|
2013-10-06 08:06:22 +08:00
|
|
|
|
|
|
|
|
|
|
|
# Make the app
|
2016-04-20 14:34:12 +08:00
|
|
|
xcodebuild -scheme fish.app -configuration Release DSTROOT=/tmp/fish_app/ SYMROOT=DerivedData/fish/Build/Products
|
2013-10-06 08:06:22 +08:00
|
|
|
rm -f ~/fish_built/fish.app.zip
|
|
|
|
cd DerivedData/fish/Build/Products/Release/
|
2016-04-20 14:34:12 +08:00
|
|
|
zip -r ~/fish_built/fish-$VERSION.app.zip fish.app
|