Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
74 lines (56 loc) · 1.54 KB
/
Copy pathMakefile
File metadata and controls
74 lines (56 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
###############################################
#
# Makefile
#
###############################################
.DEFAULT_GOAL := help
VERSION = 13.0.0
DEST ?= "NewProject"
#
# Users targets
#
# display usage info
help:
@echo "Usage: make <objc:swift> DEST=<destination path>>"
# install the Objective-C template
objc:
mkdir -p "${DEST}"
tar cf - --exclude=.git -C ObjcTemplate . | (cd "${DEST}" && tar xvf - )
# install the Swift template
swift:
mkdir -p "${DEST}"
tar cf - --exclude=.git -C SwiftTemplate . | (cd "${DEST}" && tar xvf - )
#
# Test targets
#
# test the templates
test:
@xcodebuild -project ObjcTemplate/Project.xcodeproj -scheme App -sdk iphonesimulator
@xcodebuild -project SwiftTemplate/Project.xcodeproj -scheme App -sdk iphonesimulator
testobjc:
$(MAKE) objc DEST=TestObjc
xcodebuild -project TestObjc/Project.xcodeproj -scheme App -sdk iphonesimulator
rm -rf TestObjc
testswift:
$(MAKE) objc DEST=TestSwift
xcodebuild -project TestSwift/Project.xcodeproj -scheme App -sdk iphonesimulator
rm -rf TestSwift
#
# Development targets
#
github:
open "https://github.com/mlavergn/xcode-templates"
# open the objc template
openobjc:
open ObjcTemplate/Project.xcodeproj
# open the swift template
openswift:
open SwiftTemplate/Project.xcodeproj
# open SourceTree in the project dir
st:
open -a SourceTree .
# release template update
release:
zip -r xctemplates.zip LICENSE README.md Makefile ObjcTemplate SwiftTemplate
hub release create -m "${VERSION} - Xcode Templates" -a xctemplates.zip -t master "v${VERSION}"
rm xctemplates.zip