forked from saucelabs/sample-app-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
push_apps_to_storage.sh
executable file
·46 lines (43 loc) · 1.5 KB
/
push_apps_to_storage.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
#!/bin/bash
VERSION=$(cat ../package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[",]//g' \
| tr -d '[[:space:]]')
## US
# Android
curl \
-F "payload=@../apps/Android.SauceLabs.Mobile.Sample.app.$VERSION.apk" \
-F name=sample-app-android.apk \
-u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" \
'https://api.us-west-1.saucelabs.com/v1/storage/upload'
# iOS
curl \
-F "payload=@../apps/iOS.Simulator.SauceLabs.Mobile.Sample.app.$VERSION.zip" \
-F name=sample-app-ios.zip \
-u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" \
'https://api.us-west-1.saucelabs.com/v1/storage/upload'
curl \
-F "payload=@../apps/iOS.RealDevice.SauceLabs.Mobile.Sample.app.$VERSION.ipa" \
-F name=sample-app-ios.ipa \
-u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" \
'https://api.us-west-1.saucelabs.com/v1/storage/upload'
## EU
# Android
curl \
-F "payload=@../apps/Android.SauceLabs.Mobile.Sample.app.$VERSION.apk" \
-F name=sample-app-android.apk \
-u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" \
'https://api.eu-central-1.saucelabs.com/v1/storage/upload'
# iOS
curl \
-F "payload=@../apps/iOS.Simulator.SauceLabs.Mobile.Sample.app.$VERSION.zip" \
-F name=sample-app-ios.zip \
-u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" \
'https://api.eu-central-1.saucelabs.com/v1/storage/upload'
curl \
-F "payload=@../apps/iOS.RealDevice.SauceLabs.Mobile.Sample.app.$VERSION.ipa" \
-F name=sample-app-ios.ipa \
-u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" \
'https://api.eu-central-1.saucelabs.com/v1/storage/upload'