-
Notifications
You must be signed in to change notification settings - Fork 23
/
Makefile
37 lines (28 loc) · 1.49 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
34
35
36
37
TARGET_CODESIGN = $(shell which ldid)
POGOTMP = $(TMPDIR)/pogo
POGO_STAGE_DIR = $(POGOTMP)/stage
POGO_APP_DIR = $(POGOTMP)/Build/Products/Release-iphoneos/Pogo.app
POGO_HELPER_PATH = $(POGOTMP)/Build/Products/Release-iphoneos/PogoHelper
GIT_REV=$(shell git rev-parse --short HEAD)
package:
/usr/libexec/PlistBuddy -c "Set :REVISION ${GIT_REV}" "Pogo/Info.plist"
@set -o pipefail; \
xcodebuild -jobs $(shell sysctl -n hw.ncpu) -project 'Pogo.xcodeproj' -scheme Pogo -configuration Release -arch arm64 -sdk iphoneos -derivedDataPath $(POGOTMP) \
CODE_SIGNING_ALLOWED=NO DSTROOT=$(POGOTMP)/install ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO
@set -o pipefail; \
xcodebuild -jobs $(shell sysctl -n hw.ncpu) -project 'Pogo.xcodeproj' -scheme PogoHelper -configuration Release -arch arm64 -sdk iphoneos -derivedDataPath $(POGOTMP) \
CODE_SIGNING_ALLOWED=NO DSTROOT=$(POGOTMP)/install ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO
@rm -rf Payload
@rm -rf $(POGO_STAGE_DIR)/
@mkdir -p $(POGO_STAGE_DIR)/Payload
@mv $(POGO_APP_DIR) $(POGO_STAGE_DIR)/Payload/Pogo.app
@echo $(POGOTMP)
@echo $(POGO_STAGE_DIR)
@mv $(POGO_HELPER_PATH) $(POGO_STAGE_DIR)/Payload/Pogo.app//PogoHelper
@$(TARGET_CODESIGN) -Sentitlements.xml $(POGO_STAGE_DIR)/Payload/Pogo.app/
@$(TARGET_CODESIGN) -Sentitlements.xml $(POGO_STAGE_DIR)/Payload/Pogo.app//PogoHelper
@rm -rf $(POGO_STAGE_DIR)/Payload/Pogo.app/_CodeSignature
@ln -sf $(POGO_STAGE_DIR)/Payload Payload
@rm -rf packages
@mkdir -p packages
@zip -r9 packages/Pogo.ipa Payload