Created
September 3, 2014 10:36
-
-
Save Daniel1of1/6a81be4a2411b95dbc37 to your computer and use it in GitHub Desktop.
makefile
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
PLIST_BUDDY = /usr/libexec/PlistBuddy | |
DEFAULT_FLAGS = -sdk iphonesimulator | |
TESTING_TOOL = xcodebuild | |
PROJECT_NAME = myCompanyIOS | |
WORKSPACE = $(PROJECT_NAME).xcworkspace | |
DEFAULT_SCHEME = $(PROJECT_NAME) | |
APP_PLIST = $(PROJECT_NAME)/$(PROJECT_NAME)-Info.plist | |
TMP_APP_PLIST = $(APP_PLIST).orig | |
BUNDLE_ID = com.myCompany.mymyCompany | |
BUNDLE_NAME = 'my myCompany' | |
CONFIGURATION=Release | |
BUNDLE_VERSION = $(shell $(PLIST_BUDDY) -c "Print CFBundleVersion" $(APP_PLIST)) | |
GIT_COMMIT = $(shell git log -n1 --format='%h') | |
IPA = $(PROJECT_NAME).ipa | |
DSYM = $(PROJECT_NAME).app.dSYM.zip | |
DEFAULT_TASK = $(TESTING_TOOL) -workspace $(WORKSPACE) -scheme $(DEFAULT_SCHEME) $(DEFAULT_FLAGS) | |
.PHONY: build clean test pods distribute deploy copyplist updateplist | |
install: | |
gem install cocoapods | |
pod install | |
pods: | |
rm -rf Pods | |
pod install | |
test: | |
$(DEFAULT_TASK) test | |
updateplist: | |
cp $(APP_PLIST) $(TMP_APP_PLIST) | |
$(PLIST_BUDDY) -c "Set CFBundleIdentifier $(BUNDLE_ID)" $(APP_PLIST) | |
$(PLIST_BUDDY) -c "Set CFBundleDisplayName $(BUNDLE_NAME)" $(APP_PLIST) | |
restoreplist: | |
mv -f $(TMP_APP_PLIST) $(APP_PLIST) | |
rm -f $(TMP_APP_PLIST) | |
clean: restoreplist | |
-rm -f $(IPA) $(DSYM) HOCKEYAPP_TOKEN | |
build: | |
$(DEFAULT_TASK) build | |
ipa: | |
ipa build --scheme $(DEFAULT_SCHEME) --configuration $(CONFIGURATION) -t | |
beta: BUNDLE_NAME = 'myProduct β' | |
beta: BUNDLE_ID = com.myCompany.myProductBeta | |
beta: NOTIFY = 1 | |
beta: CONFIGURATION=Beta | |
beta: | |
touch HOCKEYAPP_TOKEN | |
echo "XXXXXXXXXXXXXXX" > HOCKEYAPP_TOKEN | |
beta: updateplist ipa restoreplist | |
distribute: | |
curl \ | |
-F status=2 \ | |
-F ipa=@$(IPA) \ | |
-F dsym=@$(DSYM) \ | |
-H 'X-HockeyAppToken: $(HOCKEYAPP_TOKEN)' \ | |
https://rink.hockeyapp.net/api/2/apps/upload \ | |
| grep -v "errors" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment