motion-appstore 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -6
- data/command/motion-upload.rb +3 -2
- data/command/motion-validate.rb +3 -2
- data/command/utils.rb +43 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5e8fa8fae79cdf440bd5f631b3555a07d2fda19
|
4
|
+
data.tar.gz: 5d17244b468e299eecd20598bccfccaedf99abe9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 883b4d76f9bf53144a03cd3d5239587735957c5458e1037d035d41dfb1de505c91bb861c6e6837bc27361dec42de2094ccc2b7e51636f4bf11787c4bdfbaaa6c
|
7
|
+
data.tar.gz: 657950284264f0a53dfb829cde115717bde4ce70077de7322c2a74aa2980cbbe3f9844a425de65df22d5ab2e14dd324d41da377483fadc14d15a469f3e71efff
|
data/README.md
CHANGED
@@ -30,13 +30,11 @@ This command validates your app whether it is possible to upload to iTunes Conne
|
|
30
30
|
|
31
31
|
Example)
|
32
32
|
|
33
|
-
If app configuration has some
|
33
|
+
If app configuration has some errors:
|
34
34
|
```
|
35
35
|
$ motion validate watson1978@gmail.com
|
36
36
|
Validate: ./build/iPhoneOS-8.1-Release/HelloActions.ipa
|
37
|
-
|
38
|
-
"Error Domain=ITunesConnectionOperationErrorDomain Code=1091 \"Redundant Binary Upload. There already exists a binary upload with build '1.0' for version '1.7'\" UserInfo=0x7f81205293d0 {NSLocalizedRecoverySuggestion=Redundant Binary Upload. There already exists a binary upload with build '1.0' for version '1.7', NSLocalizedDescription=Redundant Binary Upload. There already exists a binary upload with build '1.0' for version '1.7', NSLocalizedFailureReason=iTunes Store operation failed.}"
|
39
|
-
)
|
37
|
+
✗ Redundant Binary Upload. There already exists a binary upload with build '1.0' for version '1.10'
|
40
38
|
```
|
41
39
|
|
42
40
|
The app is good to submit to iTunes Connect:
|
@@ -44,7 +42,7 @@ The app is good to submit to iTunes Connect:
|
|
44
42
|
```
|
45
43
|
$ motion validate watson1978@gmail.com
|
46
44
|
Validate: ./build/iPhoneOS-8.1-Release/HelloActions.ipa
|
47
|
-
|
45
|
+
✓ No errors validating archive at ./build/iPhoneOS-8.1-Release/HelloActions.ipa
|
48
46
|
```
|
49
47
|
|
50
48
|
### upload
|
@@ -56,5 +54,5 @@ Example)
|
|
56
54
|
```
|
57
55
|
$ motion upload watson1978@gmail.com
|
58
56
|
Upload: ./build/iPhoneOS-8.1-Release/HelloActions.ipa
|
59
|
-
|
57
|
+
✓ No errors uploading ./build/iPhoneOS-8.1-Release/HelloActions.ipa
|
60
58
|
```
|
data/command/motion-upload.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
1
2
|
require_relative 'utils'
|
2
3
|
|
3
4
|
module Motion; class Command
|
@@ -21,8 +22,8 @@ module Motion; class Command
|
|
21
22
|
archive = archive_path()
|
22
23
|
puts bold("Upload: ") + archive
|
23
24
|
|
24
|
-
|
25
|
-
exit
|
25
|
+
exitcode = altool("--upload-app -f #{archive} -u #{@adc_id} -p #{password}")
|
26
|
+
exit(exitcode)
|
26
27
|
end
|
27
28
|
|
28
29
|
end
|
data/command/motion-validate.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
1
2
|
require_relative 'utils'
|
2
3
|
|
3
4
|
module Motion; class Command
|
@@ -21,8 +22,8 @@ module Motion; class Command
|
|
21
22
|
archive = archive_path()
|
22
23
|
puts bold("Validate: ") + archive
|
23
24
|
|
24
|
-
|
25
|
-
exit
|
25
|
+
exitcode = altool("-v -f #{archive} -u #{@adc_id} -p #{password}")
|
26
|
+
exit(exitcode)
|
26
27
|
end
|
27
28
|
|
28
29
|
end
|
data/command/utils.rb
CHANGED
@@ -1,6 +1,15 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
1
2
|
module Utils
|
2
3
|
ALTOOL = "/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Support/altool"
|
3
4
|
|
5
|
+
def altool(arg)
|
6
|
+
message = `\"#{ALTOOL}\" #{arg} 2>&1`
|
7
|
+
messages = parse_nslog_message(message)
|
8
|
+
print_messages(messages, $?.exitstatus == 0)
|
9
|
+
|
10
|
+
$?.exitstatus
|
11
|
+
end
|
12
|
+
|
4
13
|
def archive_path
|
5
14
|
unless File.exist?('Rakefile')
|
6
15
|
help! "Run on Root Directoy of RubyMotion Project"
|
@@ -15,10 +24,6 @@ module Utils
|
|
15
24
|
archive
|
16
25
|
end
|
17
26
|
|
18
|
-
def bold(msg)
|
19
|
-
ansi_output? ? "\e[1;32m" + msg + "\e[0m" : msg
|
20
|
-
end
|
21
|
-
|
22
27
|
def password
|
23
28
|
# retrive password from keychain which might be created by Xcode
|
24
29
|
`security find-internet-password -g -a #{@adc_id} -s idmsa.apple.com -r htps 2>&1`.each_line { |line|
|
@@ -42,4 +47,38 @@ module Utils
|
|
42
47
|
end
|
43
48
|
end
|
44
49
|
|
50
|
+
def parse_nslog_message(message)
|
51
|
+
messages = []
|
52
|
+
message.split("\n").each do |msg|
|
53
|
+
msg.strip!
|
54
|
+
if m = msg.match(/(No errors.+)/)
|
55
|
+
# success
|
56
|
+
messages << m[1]
|
57
|
+
elsif m = msg.match(/^"Error Domain=[^"]+"(.+)\\" UserInfo=.+/)
|
58
|
+
# error
|
59
|
+
messages << m[1]
|
60
|
+
end
|
61
|
+
end
|
62
|
+
messages
|
63
|
+
end
|
64
|
+
|
65
|
+
def print_messages(messages, is_success)
|
66
|
+
mark = is_success ? green("✓ ") : red("✗ ")
|
67
|
+
messages.each do |msg|
|
68
|
+
puts mark + msg
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
def bold(msg)
|
73
|
+
ansi_output? ? "\e[1;34m" + msg + "\e[0m" : msg
|
74
|
+
end
|
75
|
+
|
76
|
+
def red(msg)
|
77
|
+
ansi_output? ? "\e[1;31m" + msg + "\e[0m" : msg
|
78
|
+
end
|
79
|
+
|
80
|
+
def green(msg)
|
81
|
+
ansi_output? ? "\e[1;32m" + msg + "\e[0m" : msg
|
82
|
+
end
|
83
|
+
|
45
84
|
end
|