-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (48 loc) · 1.54 KB
/
Makefile
File metadata and controls
53 lines (48 loc) · 1.54 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
SCHEME = FastGit Menu
BUILD_DIR = build
APP_NAME = FastGit Menu
DMG_NAME = FastGit-Menu
.PHONY: build build-ci archive dmg clean
build:
xcodebuild \
-scheme "$(SCHEME)" \
-configuration Release \
-derivedDataPath "$(BUILD_DIR)/derived" \
build
@mkdir -p "$(BUILD_DIR)"
@cp -R "$(BUILD_DIR)/derived/Build/Products/Release/$(APP_NAME).app" "$(BUILD_DIR)/$(APP_NAME).app"
@echo "Built: $(BUILD_DIR)/$(APP_NAME).app"
build-ci:
xcodebuild \
-scheme "$(SCHEME)" \
-configuration Release \
-derivedDataPath "$(BUILD_DIR)/derived" \
CODE_SIGN_STYLE=Manual \
CODE_SIGN_IDENTITY="Developer ID Application" \
CODE_SIGNING_REQUIRED=YES \
CODE_SIGNING_ALLOWED=YES \
DEVELOPMENT_TEAM=ZF9P9LGM63 \
PROVISIONING_PROFILE_SPECIFIER="" \
OTHER_CODE_SIGN_FLAGS="--timestamp" \
CODE_SIGN_INJECT_BASE_ENTITLEMENTS=NO \
build
@mkdir -p "$(BUILD_DIR)"
@cp -R "$(BUILD_DIR)/derived/Build/Products/Release/$(APP_NAME).app" "$(BUILD_DIR)/$(APP_NAME).app"
@echo "Built: $(BUILD_DIR)/$(APP_NAME).app"
dmg:
@rm -f "$(BUILD_DIR)/$(DMG_NAME).dmg"
@rm -rf "$(BUILD_DIR)/dmg-staging"
@mkdir -p "$(BUILD_DIR)/dmg-staging"
@cp -R "$(BUILD_DIR)/$(APP_NAME).app" "$(BUILD_DIR)/dmg-staging/"
@ln -s /Applications "$(BUILD_DIR)/dmg-staging/Applications"
hdiutil create \
-volname "$(APP_NAME)" \
-srcfolder "$(BUILD_DIR)/dmg-staging" \
-ov \
-format UDZO \
"$(BUILD_DIR)/$(DMG_NAME).dmg"
@rm -rf "$(BUILD_DIR)/dmg-staging"
@echo "DMG: $(BUILD_DIR)/$(DMG_NAME).dmg"
clean:
rm -rf "$(BUILD_DIR)"
xcodebuild clean -scheme "$(SCHEME)" 2>/dev/null || true