-
-
Notifications
You must be signed in to change notification settings - Fork 316
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·55 lines (42 loc) · 1.24 KB
/
Makefile
File metadata and controls
executable file
·55 lines (42 loc) · 1.24 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
NAME := Feather
PLATFORM := iphoneos
SCHEMES := Feather
TMP := $(TMPDIR)/$(NAME)
STAGE := $(TMP)/stage
APP := $(TMP)/Build/Products/Release-$(PLATFORM)
CERT_JSON_URL := https://backloop.dev/pack.json
.PHONY: all deps clean $(SCHEMES)
all: $(SCHEMES)
clean:
rm -rf $(TMP)
rm -rf packages
rm -rf Payload
deps:
rm -rf deps || true
mkdir -p deps
curl -fsSL "$(CERT_JSON_URL)" -o cert.json
jq -r '.cert' cert.json > deps/server.crt
jq -r '.key1, .key2' cert.json > deps/server.pem
jq -r '.info.domains.commonName' cert.json > deps/commonName.txt
$(SCHEMES): deps
xcodebuild \
-project Feather.xcodeproj \
-scheme "$@" \
-configuration Release \
-arch arm64 \
-sdk $(PLATFORM) \
-derivedDataPath $(TMP) \
-skipPackagePluginValidation \
CODE_SIGNING_ALLOWED=NO \
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO
rm -rf Payload
rm -rf $(STAGE)/
mkdir -p $(STAGE)/Payload
mv "$(APP)/$@.app" "$(STAGE)/Payload/$@.app"
chmod -R 0755 "$(STAGE)/Payload/$@.app"
codesign --force --sign - --timestamp=none "$(STAGE)/Payload/$@.app"
cp deps/* "$(STAGE)/Payload/$@.app/" || true
rm -rf "$(STAGE)/Payload/$@.app/_CodeSignature"
ln -sf "$(STAGE)/Payload" Payload
mkdir -p packages
zip -r9 "packages/$@.ipa" Payload