-
Notifications
You must be signed in to change notification settings - Fork 284
/
Makefile
executable file
·58 lines (51 loc) · 2.12 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
chrome:
@mkdir -p release
@rm -f release/cryptocat.chrome.zip
@cd src/core/ && zip -q -r9 ../../release/cryptocat.chrome.zip * -x "*/\.*" -x "\.*"
@/bin/echo "[Cryptocat] Chrome build available in release/"
firefox:
@mkdir -p release
@rm -f release/cryptocat.firefox.xpi
@mkdir src/firefox/chrome/content/data/
@cp -r src/core/* src/firefox/chrome/content/data/
@cd src/firefox/ && zip -q -r9 ../../release/cryptocat.firefox.xpi * -x "*/\.*" -x "\.*"
@rm -r src/firefox/chrome/content/data/
@/bin/echo "[Cryptocat] Firefox build available in release/"
safari:
@rm -rf src/cryptocat.safariextension
@cp -R src/core src/cryptocat.safariextension
@cp -R src/safari/* src/cryptocat.safariextension
@/bin/echo "[Cryptocat] Safari extension packaged for testing."
opera:
@mkdir -p release
@rm -f release/cryptocat_opera.nex
@cp -r src/core/css src/core/img src/core/index.html src/core/js src/core/locale src/core/snd src/opera
@cd src/opera/ && zip -q -r9 ../../release/cryptocat_opera.nex * -x "*/\.*" -x "\.*"
@rm -rf src/opera/css src/opera/img src/opera/index.html src/opera/js src/opera/locale src/opera/snd
@/bin/echo "[Cryptocat] Opera build available in release/"
mac:
@rm -rf release/Cryptocat.app
@rm -rf release/cryptocat.mac.zip
@rm -rf src/mac/htdocs
@cp -R src/core src/mac/htdocs
@xcodebuild -project src/mac/Cryptocat.xcodeproj -configuration 'Release' -alltargets clean
@xcodebuild CONFIGURATION_BUILD_DIR="${PWD}/release" -project src/mac/Cryptocat.xcodeproj -configuration 'Release' build
@rm -rf release/Cryptocat.app.dSYM
@cd release && zip -q -r9 cryptocat.mac.zip Cryptocat.app
@/bin/echo "[Cryptocat] Mac app available in release/"
tests:
@/bin/echo -n "[Cryptocat] Running tests... "
@`/usr/bin/which npm` install
@node_modules/.bin/mocha --ui exports --reporter spec test/core/js/*.test.js
lint:
@node_modules/.bin/jshint --verbose --config .jshintrc \
src/core/js/cryptocat.js \
src/core/js/lib/multiParty.js \
src/core/js/lib/elliptic.js \
src/core/js/lib/salsa20.js \
src/core/js/etc/*.js \
src/standaloneServer.js \
test/testBase.js \
test/core/js/*.js \
Gruntfile.js
all: lint tests