Skip to content

Commit 3300b9c

Browse files
committed
Appium helper makefile
1 parent 47d231a commit 3300b9c

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

tests/Makefile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
RENDERER_DIR := ../nativescript-angular
2+
RENDERER_SRC := $(shell find "$(RENDERER_DIR)" -iname '*.ts')
3+
RENDERER_COMPILED := node_modules/nativescript-angular-latest.txt
4+
RENDERER_LINKED := node_modules/renderer-linked.txt
5+
SEMVER_CLEANED := node_modules/semver-cleaned.txt
6+
APK := platforms/android/build/outputs/apk/ngtests-debug.apk
7+
APP_SRC := $(shell find "app" -type f)
8+
9+
$(APK): $(APP_SRC) $(RENDERER_COMPILED)
10+
tns build android
11+
@touch $@
12+
13+
appium-android: $(APK) $(SEMVER_CLEANED)
14+
./node_modules/.bin/nativescript-dev-appium android
15+
16+
$(RENDERER_LINKED):
17+
#npm link nativescript-angular
18+
@mkdir -p node_modules
19+
@touch $@
20+
21+
$(SEMVER_CLEANED):
22+
tns install
23+
find -L node_modules -iname '*.gz' -delete
24+
@touch $@
25+
26+
clean:
27+
@rm -rf node_modules platforms
28+
29+
$(RENDERER_COMPILED): $(RENDERER_SRC) $(RENDERER_LINKED)
30+
#cd "$(RENDERER_DIR)" && ./node_modules/.bin/tsc
31+
npm install "$(RENDERER_DIR)" --production
32+
@touch $@
33+
34+
run-android: $(RENDERER_COMPILED) $(SEMVER_CLEANED)
35+
tns livesync android
36+
37+
.PHONY: run-android clean appium-android

0 commit comments

Comments
 (0)