forked from gnachman/iTerm2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
88 lines (69 loc) · 2.46 KB
/
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
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
PATH := /usr/bin:/bin:/usr/sbin:/sbin
ORIG_PATH := $(PATH)
PATH := /usr/bin:/bin:/usr/sbin:/sbin
ITERM_PID=$(shell pgrep "iTerm2")
APPS := /Applications
ITERM_CONF_PLIST = $(HOME)/Library/Preferences/com.googlecode.iterm2.plist
COMPACTDATE=$(shell date +"%Y%m%d")
VERSION = $(shell cat version.txt | sed -e "s/%(extra)s/$(COMPACTDATE)/")
NAME=$(shell echo $(VERSION) | sed -e "s/\\./_/g")
.PHONY: clean all backup-old-iterm restart
all: Development
dev: Development
prod: Deployment
debug: Development
/Developer/usr/bin/gdb build/Development/iTerm2.app/Contents/MacOS/iTerm
TAGS:
find . -name "*.[mhMH]" -exec etags -o ./TAGS -a '{}' +
install: | Deployment backup-old-iterm
cp -R build/Deployment/iTerm2.app $(APPS)
Development:
echo "Using PATH for build: $(PATH)"
xcodebuild -parallelizeTargets -target iTerm2 -configuration Development && \
chmod -R go+rX build/Development
Dep:
xcodebuild -parallelizeTargets -target iTerm2 -configuration Deployment
Deployment:
xcodebuild -parallelizeTargets -target iTerm2 -configuration Deployment && \
chmod -R go+rX build/Deployment
Nightly: force
cp plists/nightly-iTerm2.plist plists/iTerm2.plist
xcodebuild -parallelizeTargets -target iTerm2 -configuration Nightly CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO && \
git checkout -- plists/iTerm2.plist
chmod -R go+rX build/Nightly
run: Development
build/Development/iTerm2.app/Contents/MacOS/iTerm2
devzip: Development
cd build/Development && \
zip -r iTerm2-$(NAME).zip iTerm2.app
zip: Deployment
cd build/Deployment && \
zip -r iTerm2-$(NAME).zip iTerm2.app
clean:
xcodebuild -parallelizeTargets -alltargets clean
rm -rf build
rm -f *~
backup-old-iterm:
if [[ -d $(APPS)/iTerm2.app.bak ]] ; then rm -fr $(APPS)/iTerm2.app.bak ; fi
if [[ -d $(APPS)/iTerm2.app ]] ; then \
/bin/mv $(APPS)/iTerm2.app $(APPS)/iTerm2.app.bak ;\
cp $(ITERM_CONF_PLIST) $(APPS)/iTerm2.app.bak/Contents/ ; \
fi
restart:
PATH=$(ORIG_PATH) /usr/bin/open /Applications/iTerm2.app &
/bin/kill -TERM $(ITERM_PID)
canary:
cp canary-iTerm2.plist iTerm2.plist
make Deployment
./canary.sh
release:
echo "You need to unlock your keychain for signing to work."
security unlock-keychain ~/Library/Keychains/login.keychain
cp plists/release-iTerm2.plist plists/iTerm2.plist
make Deployment
preview:
echo "You need to unlock your keychain for signing to work."
security unlock-keychain ~/Library/Keychains/login.keychain
cp plists/preview-iTerm2.plist plists/iTerm2.plist
make Deployment
force: