Skip to content

Instantly share code, notes, and snippets.

@hakobe
Created January 21, 2012 05:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hakobe/1651372 to your computer and use it in GitHub Desktop.
Save hakobe/1651372 to your computer and use it in GitHub Desktop.
make testflight
.PHONY: all build archive testflight
PROJECT ?= BKUMA.xcodeproj
SCHEME ?= B!KUMA Girls
SIGN ?= iPhone Developer: Yohei Fushii (123456789)
MOBILEPROVISION ?= provisionings/$(SCHEME).mobileprovision
DISTRIBUTION_LIST ?= B!KUMA Testers
NOTIFY ?= False
all: archive
out:
mkdir -p $@
build: out
xcodebuild -project '$(PROJECT)' -scheme '$(SCHEME)' -sdk iphoneos5.0 -configuration 'Ad Hoc' install DSTROOT=out
archive: build
xcrun -sdk iphoneos5.0 PackageApplication 'out/Applications/$(SCHEME).app' -o '$(PWD)/out/$(SCHEME).ipa' --sign '$(SIGN)' --embed '$(MOBILEPROVISION)'
testflight: archive
curl 'http://testflightapp.com/api/builds.json' \
-F 'file=@$(PWD)/out/$(SCHEME).ipa' \
-F 'api_token=Your API token' \
-F 'team_token=Your team token' \
-F 'notes=This build was uploaded via the upload API' \
-F 'distribution_lists=$(DISTRIBUTION_LIST)' \
-F 'notify=$(NOTIFY)'
clean:
rm -rf ./out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment