motion-appstore 1.0.2
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 +7 -0
- data/README.md +46 -0
- data/command/motion-upload.rb +29 -0
- data/command/motion-validate.rb +29 -0
- data/command/utils.rb +45 -0
- data/ext/extconf.rb +17 -0
- metadata +51 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 308cb86fd24ed703222196e7c3848500ff38320a
|
4
|
+
data.tar.gz: b3826b11fdd994e194cd501ef721789a4f1900b3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 17316f490766cdb3e72299619c4ae55790bcabc3e9327e9493df37ec2be5d605d5113302f5a49b6f03ab01b0810267b10f3b32a92f0dd0937c02aea561a9bb47
|
7
|
+
data.tar.gz: 482ec087290931599714673209ee52d10ca0eceaedf82bcc6059218c5d55527b89d0a6b27e8e1c6a04ac5f0354029bd89426bf0394de64db16694e7073462ea8
|
data/README.md
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
# motion-appstore
|
2
|
+
|
3
|
+
This is RubyMotion plugin which provides `validate` and `upload` commands for iTunes Connect.
|
4
|
+
|
5
|
+
## Usage
|
6
|
+
|
7
|
+
```
|
8
|
+
$ rake archive:distribution
|
9
|
+
$ motion validate APPLE-ID
|
10
|
+
$ motion upload APPLE-ID
|
11
|
+
```
|
12
|
+
|
13
|
+
### validate
|
14
|
+
|
15
|
+
This command validates your app whether it is possible to upload to iTunes Connect.
|
16
|
+
|
17
|
+
Example)
|
18
|
+
|
19
|
+
If app configuration has some error:
|
20
|
+
```
|
21
|
+
$ motion validate watson1978@gmail.com
|
22
|
+
Validate: ./build/iPhoneOS-8.1-Release/HelloActions.ipa
|
23
|
+
2015-01-04 06:03:53.172 altool[9688:97684] *** Error: (
|
24
|
+
"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.}"
|
25
|
+
)
|
26
|
+
```
|
27
|
+
|
28
|
+
The app is good to submit to iTunes Connect:
|
29
|
+
|
30
|
+
```
|
31
|
+
$ motion validate watson1978@gmail.com
|
32
|
+
Validate: ./build/iPhoneOS-8.1-Release/HelloActions.ipa
|
33
|
+
2015-01-04 06:11:56.252 altool[10072:101867] No errors validating archive at ./build/iPhoneOS-8.1-Release/HelloActions.ipa
|
34
|
+
```
|
35
|
+
|
36
|
+
### upload
|
37
|
+
|
38
|
+
This command uploads your app to iTunes Connect.
|
39
|
+
|
40
|
+
Example)
|
41
|
+
|
42
|
+
```
|
43
|
+
$ motion upload watson1978@gmail.com
|
44
|
+
Upload: ./build/iPhoneOS-8.1-Release/HelloActions.ipa
|
45
|
+
2015-01-04 14:36:28.662 altool[25221:247213] No errors uploading ./build/iPhoneOS-8.1-Release/HelloActions.ipa
|
46
|
+
```
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require_relative 'utils'
|
2
|
+
|
3
|
+
module Motion; class Command
|
4
|
+
class Upload < Command
|
5
|
+
include Utils
|
6
|
+
|
7
|
+
self.summary = 'Upload an archived app to iTunes Connect'
|
8
|
+
self.arguments = 'APPLE-ID'
|
9
|
+
|
10
|
+
def initialize(argv)
|
11
|
+
@adc_id = argv.shift_argument
|
12
|
+
super
|
13
|
+
end
|
14
|
+
|
15
|
+
def validate!
|
16
|
+
super
|
17
|
+
help! "Specify an Apple ID in Apple developer center." unless @adc_id
|
18
|
+
end
|
19
|
+
|
20
|
+
def run
|
21
|
+
archive = archive_path()
|
22
|
+
puts bold("Upload: ") + archive
|
23
|
+
|
24
|
+
system "\"#{ALTOOL}\" --upload-app -f #{archive} -u #{@adc_id} -p #{password}"
|
25
|
+
exit $?.exitstatus
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
end; end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require_relative 'utils'
|
2
|
+
|
3
|
+
module Motion; class Command
|
4
|
+
class Validate < Command
|
5
|
+
include Utils
|
6
|
+
|
7
|
+
self.summary = 'Validate an archived app'
|
8
|
+
self.arguments = 'APPLE-ID'
|
9
|
+
|
10
|
+
def initialize(argv)
|
11
|
+
@adc_id = argv.shift_argument
|
12
|
+
super
|
13
|
+
end
|
14
|
+
|
15
|
+
def validate!
|
16
|
+
super
|
17
|
+
help! "Specify an Apple ID in Apple developer center." unless @adc_id
|
18
|
+
end
|
19
|
+
|
20
|
+
def run
|
21
|
+
archive = archive_path()
|
22
|
+
puts bold("Validate: ") + archive
|
23
|
+
|
24
|
+
system "\"#{ALTOOL}\" -v -f #{archive} -u #{@adc_id} -p #{password}"
|
25
|
+
exit $?.exitstatus
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
end; end
|
data/command/utils.rb
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
module Utils
|
2
|
+
ALTOOL = "/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Support/altool"
|
3
|
+
|
4
|
+
def archive_path
|
5
|
+
unless File.exist?('Rakefile')
|
6
|
+
help! "Run on Root Directoy of RubyMotion Project"
|
7
|
+
end
|
8
|
+
|
9
|
+
# There might be *.ipa in Development and Release directory.
|
10
|
+
# In here, it takes *.ipa in Release with #last method
|
11
|
+
archive = Dir.glob("./build/*/*.ipa").last
|
12
|
+
unless archive
|
13
|
+
help! "Can't find *.ipa. First, need to create *.ipa with `rake archive' or `rake archive:distribution'"
|
14
|
+
end
|
15
|
+
archive
|
16
|
+
end
|
17
|
+
|
18
|
+
def bold(msg)
|
19
|
+
ansi_output? ? "\e[1;32m" + msg + "\e[0m" : msg
|
20
|
+
end
|
21
|
+
|
22
|
+
def password
|
23
|
+
# retrive password from keychain which might be created by Xcode
|
24
|
+
`security find-internet-password -g -a #{@adc_id} -s idmsa.apple.com -r htps 2>&1`.each_line { |line|
|
25
|
+
if line =~ /^password: "(.+)"$/
|
26
|
+
return $1
|
27
|
+
end
|
28
|
+
}
|
29
|
+
|
30
|
+
# retrive password by user input
|
31
|
+
begin
|
32
|
+
require 'io/console'
|
33
|
+
rescue LoadError
|
34
|
+
end
|
35
|
+
|
36
|
+
prompt = bold("Enter your password: ")
|
37
|
+
if STDIN.respond_to?(:noecho)
|
38
|
+
print prompt
|
39
|
+
STDIN.noecho(&:gets).strip
|
40
|
+
else
|
41
|
+
`read -s -p "#{prompt}" password; echo $password`.strip
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
data/ext/extconf.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# Command-Line Plugin Installer
|
2
|
+
require 'fileutils'
|
3
|
+
|
4
|
+
dir = File.expand_path("~/Library/RubyMotion/command/")
|
5
|
+
|
6
|
+
files = ["motion-validate.rb", "motion-upload.rb"]
|
7
|
+
files.each do |file|
|
8
|
+
src = File.expand_path(File.join(File.dirname(__FILE__), "../command/#{file}"))
|
9
|
+
dst = File.join(dir, file)
|
10
|
+
|
11
|
+
FileUtils.mkdir_p(dir) unless File.exist?(dir)
|
12
|
+
FileUtils.ln_sf src, dst
|
13
|
+
end
|
14
|
+
|
15
|
+
### dummy ###
|
16
|
+
require 'mkmf'
|
17
|
+
create_makefile('')
|
metadata
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: motion-appstore
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Watson
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-01-04 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: This is RubyMotion plugin which provides commands deal with iTunes Connect.
|
14
|
+
email:
|
15
|
+
- watson1978@gmail.com
|
16
|
+
executables: []
|
17
|
+
extensions:
|
18
|
+
- ext/extconf.rb
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- README.md
|
22
|
+
- command/motion-upload.rb
|
23
|
+
- command/motion-validate.rb
|
24
|
+
- command/utils.rb
|
25
|
+
- ext/extconf.rb
|
26
|
+
homepage: https://github.com/Watson1978/motion-appstore
|
27
|
+
licenses:
|
28
|
+
- MIT
|
29
|
+
metadata: {}
|
30
|
+
post_install_message:
|
31
|
+
rdoc_options: []
|
32
|
+
require_paths:
|
33
|
+
- lib
|
34
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
35
|
+
requirements:
|
36
|
+
- - ">="
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '0'
|
39
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
requirements: []
|
45
|
+
rubyforge_project:
|
46
|
+
rubygems_version: 2.4.5
|
47
|
+
signing_key:
|
48
|
+
specification_version: 4
|
49
|
+
summary: This is RubyMotion plugin which provides commands deal with iTunes Connect.
|
50
|
+
test_files: []
|
51
|
+
has_rdoc:
|