-
-
Notifications
You must be signed in to change notification settings - Fork 332
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·57 lines (45 loc) · 1.4 KB
/
Makefile
File metadata and controls
executable file
·57 lines (45 loc) · 1.4 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
56
57
NAME := Feather
SCHEME := Feather
PLATFORMS := iphoneos maccatalyst
TMP := $(TMPDIR)/$(NAME)
CERT_JSON_URL := https://backloop.dev/pack.json
.PHONY: all clean deps $(PLATFORMS)
all: $(PLATFORMS)
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
$(PLATFORMS): deps
rm -rf _build
@if [ "$@" = "iphoneos" ]; then \
DEST="generic/platform=iOS"; \
else \
DEST="generic/platform=macOS,variant=Mac Catalyst"; \
fi; \
xcodebuild \
-project Feather.xcodeproj \
-scheme $(SCHEME) \
-configuration Release \
-destination "$$DEST" \
-derivedDataPath $(TMP)/$@ \
-skipPackagePluginValidation \
CODE_SIGNING_ALLOWED=NO \
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO
mkdir -p _build/Payload
cp -R _build/Applications/*.app _build/Payload/Feather.app
chmod -R 0755 _build/Payload/Feather.app
codesign --force --sign - --timestamp=none _build/Payload/Feather.app
cp deps/* _build/Payload/Feather.app/ || true
mkdir -p packages
@if [ "$@" = "iphoneos" ]; then \
ditto -c -k --sequesterRsrc --keepParent _build/Payload "packages/Feather.ipa"; \
else \
ditto -c -k --sequesterRsrc --keepParent _build/Payload/Feather.app "packages/Feather_Catalyst.zip"; \
fi