-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompile.sh
58 lines (50 loc) · 1.48 KB
/
compile.sh
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
#ID NO PHONEGAP BUILD
id="1520918"
phonegap_user="[email protected]"
phonegap_pass="da010690"
android_key_pass="123456"
android_id="93444"
ios_id=""
package="felippegallo.com.br.smrtfoodweb"
packageios="felippegallo.com.br.smrtfoodweb"
activity="smrtfoodweb"
#COMMIT NO GIT
clear
echo "machine github.com login gomesf \n password da010690" > $HOME/.netrc
git diff --diff-filter=D --name-only -z | xargs -0 git rm
git add *
data=$(date)
#git checkout sandbox
git commit -m "Commit $data"
git push -u origin master
#git push -u origin sandbox
#PULL LATEST
current=$(pwd)
cd ~/Downloads
#DESTRAVA CHAVE ANDROID
#curl -u $phonegap_user:$phonegap_pass -d 'data={"key_pw":"'$android_key_pass'","keystore_pw":"'$android_key_pass'"}' -X PUT https://build.phonegap.com/api/v1/keys/android/$android_id
#COMPILA
google-chrome "https://build.phonegap.com/apps/$id/push"
sleep 90
#BAIXA E INSTALA NO IPHONE
#wget "https://build.phonegap.com/apps/$id/download/ios"
#ideviceinstaller -u $packageios
#ideviceinstaller -i ios
#rm ios
#cd $current
#BAIXA E INSTALA NO ANDROID
wget "https://build.phonegap.com/apps/$id/download/android"
adb uninstall $package
adb install -r android
rm android
cd $current
#LIGA A TELA, DEPOIS DESTRAVA
adb shell input keyevent 26
adb shell input keyevent 82
#RODA
adb shell am start -a android.intent.action.MAIN -n $package/.$activity
#DEBUGA O JAVASCRIPT
clear
adb logcat | grep INFO:CONSOLE
#TIRA SCREENSHOTS
#adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screen.png