-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
34 lines (28 loc) · 1.2 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
all: clean build entitlements package clean
PROJECT = $(shell basename *.xcodeproj)
WORKING_LOCATION := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
TARGET = ControlConfig
CONFIGURATION = Release
SDK = iphoneos
XCPRETTY = $(shell command -v xcpretty 2> /dev/null)
build:
echo "Building $(TARGET) for $(SDK)..."
time xcodebuild -project $(PROJECT) -scheme $(TARGET) -configuration $(CONFIGURATION) -sdk $(SDK) CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO SYMROOT=$(PWD)/build clean build | $(XCPRETTY) -c
# xcodebuild -project $(PROJECT) -scheme $(TARGET) -configuration $(CONFIGURATION) -sdk $(SDK) CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO SYMROOT=$(PWD)/build build
echo "Build finished!"
entitlements:
echo "Adding entitlements..."
chmod a+x $(WORKING_LOCATION)bin/ldid
$(WORKING_LOCATION)bin/ldid -S"$(WORKING_LOCATION)entitlements.plist" "build/$(CONFIGURATION)-$(SDK)/$(TARGET).app"
echo "Entitlements added!"
package:
echo "Packaging app..."
rm -rf Payload
mkdir Payload
cp -r build/$(CONFIGURATION)-$(SDK)/$(TARGET).app Payload
zip -r $(TARGET).ipa Payload
echo "Packaging finished!"
clean:
rm -rf Payload
rm -rf build
echo "All done!"