Created
March 1, 2012 01:51
-
-
Save wjlafrance/1946550 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WORKSPACE = "MyAwesomeProject.xcworkspace" | |
SCHEME = "MyAwesomeProjectScheme" | |
CONFIGURATION = debug | |
TARGET_BUILD_DIR = ./build | |
BINARY = $(TARGET_BUILD_DIR)/MyAwesomeProject.app | |
IPA = MyAwesomeProject.ipa | |
# fill in from https://testflightapp.com/api/doc/ | |
TF_API_TOKEN = '' | |
TF_TEAM_TOKEN = '' | |
TF_DISTRIBUTION = 'MyAwesomeProject Beta Testers' | |
VERSION = `date +%y%m%d.%H.%M%S` | |
IDENTITY = "iPhone Developer: John Appleseed (ABCDEF1234)" | |
testflight : archive | |
curl http://testflightapp.com/api/builds.json \ | |
-F file=@$(IPA) \ | |
-F api_token=$(TF_API_TOKEN) \ | |
-F team_token=$(TF_TEAM_TOKEN) \ | |
-F distribution_lists=$(TF_DISTRIBUTION) \ | |
-F notify=True \ | |
-F replace=True \ | |
-F notes="`tail -n -2 build.log`" | |
archive : build sign | |
xcrun -sdk iphoneos PackageApplication $(BINARY) -o `pwd`/$(IPA) \ | |
--sign $(IDENTITY) --embed embed.mobileprovision | |
build : clean version | |
mkdir $(TARGET_BUILD_DIR) | |
xcodebuild -workspace $(WORKSPACE) \ | |
-scheme $(SCHEME) \ | |
-configuration $(CONFIGURATION) \ | |
TARGET_BUILD_DIR=$(TARGET_BUILD_DIR) >> build.log | |
sign : | |
codesign -f -vv -s $(IDENTITY) $(BINARY) | |
version : | |
agvtool new-marketing-version $(VERSION) >> build.log | |
agvtool new-version -all $(VERSION) >> build.log | |
clean : | |
rm -rf build build.log Pods/build $(IPA) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment