source: trunk/ICeCoffEE/package-ICeCoffEE.sh @ 445

Last change on this file since 445 was 385, checked in by Nicholas Riley, 12 years ago

package-ICeCoffEE.sh: get version from VERSION.xcconfig

File size: 1.4 KB
Line 
1#!/bin/sh
2
3set -x -v
4
5PACKAGEDIR="$PWD"
6PRODUCT="ICeCoffEE"
7
8cd "$PRODUCT" && \
9source VERSION.xcconfig && \
10find . -name \*~ -exec rm '{}' \; && \
11VERSION=${CURRENT_MARKETING_VERSION} && \
12DMG="$PRODUCT-$VERSION.dmg" VOL="$PRODUCT $VERSION" && \
13DSTROOT="$PACKAGEDIR/$VOL" && \
14sudo rm -rf "$DSTROOT" && \
15sudo rm -rf build/ && \
16rm -rf build/ && \
17xcodebuild -target "ICeCoffEE Installer" -configuration Deployment "DSTROOT=$DSTROOT" DEPLOYMENT_LOCATION=YES install && \
18mkdir "$DSTROOT" && \
19mv "build/Deployment/$PRODUCT Installer.app" "$DSTROOT/$PRODUCT $VERSION Installer.app" && \
20sudo rm -rf build/ && \
21find "$DSTROOT" -name ".svn" -type d -exec sudo /bin/rm -rf "{}" \;
22# uncomment to include localizations
23find "$DSTROOT" -name \*.lproj -type d -and -not -name English.lproj -exec sudo rm -rf "{}" \;
24cd "$PACKAGEDIR" && \
25rm -f "$DMG" && \
26hdiutil create "$DMG" -megabytes 5 -ov -layout NONE -fs 'HFS+' -volname "$VOL" && \
27MOUNT=`hdiutil attach "$DMG"` && \
28DISK=`echo "$MOUNT" | sed -ne ' s|^/dev/\([^ ]*\).*$|\1|p'` && \
29MOUNTPOINT=`echo "$MOUNT" | sed -ne 's|^.*\(/Volumes/.*\)$|\1|p'` && \
30ditto -rsrc "$DSTROOT" "$MOUNTPOINT" && \
31sudo chmod -R a+rX,u+w "$MOUNTPOINT" && \
32# openUp "$MOUNTPOINT" && \
33hdiutil detach $DISK && \
34hdiutil resize -sectors min "$DMG" && \
35hdiutil convert "$DMG" -format UDZO -imagekey zlib-level=9 -o "z$DMG" && \
36mv "z$DMG" "$DMG" && \
37hdiutil internet-enable "$DMG" && \
38# scp "$DMG" ainaz:web/nriley/software/
39:
Note: See TracBrowser for help on using the repository browser.