-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
36 lines (25 loc) · 787 Bytes
/
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
NAME := Translator
BUNDLE_ID := at.niw.$(NAME)
PROJECT_PATH := Applications/$(NAME).xcodeproj
BUILD_PATH := .build
ARCHIVE_PATH := $(BUILD_PATH)/archive
ARCHIVE_PRODUCT_BUNDLE_PATH := $(ARCHIVE_PATH).xcarchive/Products/Applications/$(NAME).app
RELEASE_ARCHIVE_PATH := $(BUILD_PATH)/$(NAME).zip
.DEFAULT_GOAL = release
.PHONY: clean
clean:
git clean -dfX
$(ARCHIVE_PRODUCT_BUNDLE_PATH):
xcodebuild \
-project "$(PROJECT_PATH)" \
-configuration Release \
-scheme "$(NAME)" \
-derivedDataPath "$(BUILD_PATH)" \
-archivePath "$(ARCHIVE_PATH)" \
archive
.PHONY: archive
archive: $(ARCHIVE_PRODUCT_BUNDLE_PATH)
$(RELEASE_ARCHIVE_PATH): $(ARCHIVE_PRODUCT_BUNDLE_PATH)
ditto -c -k --sequesterRsrc --keepParent "$<" "$@"
.PHONY: release
release: $(RELEASE_ARCHIVE_PATH)