shenzhen 0.10.3 → 0.11.0
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/Gemfile.lock +1 -1
- data/lib/shenzhen/commands/build.rb +33 -2
- data/lib/shenzhen/plugins/deploygate.rb +14 -1
- data/lib/shenzhen/plugins/fir.rb +9 -1
- data/lib/shenzhen/plugins/hockeyapp.rb +9 -3
- data/lib/shenzhen/plugins/itunesconnect.rb +2 -2
- data/lib/shenzhen/version.rb +1 -1
- data/shenzhen-0.10.3.gem +0 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8fb9c4da2e7420689c509c3effeeff0ef39f02c0
|
4
|
+
data.tar.gz: 813122a2540e9991ef978b600e07bdbc2ae807e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63de5ba58379dbd08736df16a244635b91a0a9fb9a40a59ad6846c67803985cda110f8b4c2a686189b3e9b9f74f5b2051414d5d4fb2fd51e98029dd30b5425bf
|
7
|
+
data.tar.gz: c94593552f7d8b7324ecc60529beb709ef4958312ae6faa32a104d83b90f29dc53d6d8f9b5885480fe364faf289bf6644a5a1a1864aaa1bec484ae4ea1b0d050
|
data/Gemfile.lock
CHANGED
@@ -17,6 +17,7 @@ command :build do |c|
|
|
17
17
|
c.option '-m', '--embed PROVISION', 'Sign .ipa file with .mobileprovision'
|
18
18
|
c.option '-i', '--identity IDENTITY', 'Identity to be used along with --embed'
|
19
19
|
c.option '--sdk SDK', 'use SDK as the name or path of the base SDK when building the project'
|
20
|
+
c.option '--ipa IPA', 'specify the name of the .ipa file to generate (including file extension)'
|
20
21
|
|
21
22
|
c.action do |args, options|
|
22
23
|
validate_xcode_version!
|
@@ -32,6 +33,7 @@ command :build do |c|
|
|
32
33
|
@xcconfig = options.xcconfig
|
33
34
|
@xcargs = options.xcargs
|
34
35
|
@destination = options.destination || Dir.pwd
|
36
|
+
@ipa_name_override = options.ipa
|
35
37
|
FileUtils.mkdir_p(@destination) unless File.directory?(@destination)
|
36
38
|
|
37
39
|
determine_workspace_or_project! unless @workspace || @project
|
@@ -81,16 +83,45 @@ command :build do |c|
|
|
81
83
|
@app_path = File.join(@xcodebuild_settings['BUILT_PRODUCTS_DIR'], @xcodebuild_settings['WRAPPER_NAME'])
|
82
84
|
@dsym_path = @app_path + ".dSYM"
|
83
85
|
@dsym_filename = File.expand_path("#{@xcodebuild_settings['WRAPPER_NAME']}.dSYM", @destination)
|
84
|
-
@ipa_name = @xcodebuild_settings['WRAPPER_NAME'].gsub(@xcodebuild_settings['WRAPPER_SUFFIX'], "") + ".ipa"
|
86
|
+
@ipa_name = @ipa_name_override || @xcodebuild_settings['WRAPPER_NAME'].gsub(@xcodebuild_settings['WRAPPER_SUFFIX'], "") + ".ipa"
|
85
87
|
@ipa_path = File.expand_path(@ipa_name, @destination)
|
86
88
|
|
87
89
|
log "xcrun", "PackageApplication"
|
88
90
|
abort unless system %{xcrun -sdk #{@sdk} PackageApplication -v "#{@app_path}" -o "#{@ipa_path}" --embed "#{options.embed || @dsym_path}" #{"-s \"#{options.identity}\"" if options.identity} #{'1> /dev/null' unless $verbose}}
|
89
91
|
|
92
|
+
# Determine whether this is a Swift project and, eventually, the list of libraries to copy from
|
93
|
+
# Xcode's toolchain directory since there's no "xcodebuild" target to do just that (it is done
|
94
|
+
# post-build when exporting an archived build from the "Organizer").
|
95
|
+
@ipa_swift_frameworks = Dir["#{@app_path}/Frameworks/libswift*"]
|
96
|
+
|
97
|
+
if not @ipa_swift_frameworks.empty? then
|
98
|
+
Dir.mktmpdir do |tmpdir|
|
99
|
+
# Copy all necessary Swift libraries to a temporary "SwiftSupport" directory so that we can
|
100
|
+
# easily add it to the .ipa later.
|
101
|
+
swift_support = File.join(tmpdir, "SwiftSupport")
|
102
|
+
|
103
|
+
Dir.mkdir(swift_support)
|
104
|
+
|
105
|
+
xcode = `xcode-select --print-path`.strip
|
106
|
+
|
107
|
+
@ipa_swift_frameworks.each do |path|
|
108
|
+
framework = File.basename(path)
|
109
|
+
|
110
|
+
FileUtils.copy_file("#{xcode}/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/#{@sdk}/#{framework}", File.join(swift_support, framework))
|
111
|
+
end
|
112
|
+
|
113
|
+
# Add "SwiftSupport" to the .ipa archive
|
114
|
+
Dir.chdir(tmpdir) do
|
115
|
+
abort unless system %{zip --recurse-paths "#{@ipa_path}" "SwiftSupport" #{'> /dev/null' unless $verbose}}
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
90
120
|
log "zip", @dsym_filename
|
91
121
|
abort unless system %{cp -r "#{@dsym_path}" "#{@destination}" && zip -r "#{@dsym_filename}.zip" "#{@dsym_filename}" #{'> /dev/null' unless $verbose} && rm -rf "#{@dsym_filename}"}
|
92
122
|
|
93
|
-
say_ok "
|
123
|
+
say_ok "Successfully built:"
|
124
|
+
say_ok @ipa_path
|
94
125
|
end
|
95
126
|
|
96
127
|
private
|
@@ -10,7 +10,7 @@ module Shenzhen::Plugins
|
|
10
10
|
|
11
11
|
def initialize(api_token, user_name)
|
12
12
|
@api_token, @user_name = api_token, user_name
|
13
|
-
@connection = Faraday.new(:url => "
|
13
|
+
@connection = Faraday.new(:url => "https://#{HOSTNAME}", :request => { :timeout => 120 }) do |builder|
|
14
14
|
builder.request :multipart
|
15
15
|
builder.request :json
|
16
16
|
builder.response :json, :content_type => /\bjson$/
|
@@ -45,6 +45,10 @@ command :'distribute:deploygate' do |c|
|
|
45
45
|
c.option '-a', '--api_token TOKEN', "API Token. Available at https://deploygate.com/settings"
|
46
46
|
c.option '-u', '--user_name USER_NAME', "User Name. Available at https://deploygate.com/settings"
|
47
47
|
c.option '-m', '--message MESSAGE', "Release message for the build"
|
48
|
+
c.option '-d', '--distribution_key DESTRIBUTION_KEY', "distribution key for distribution page"
|
49
|
+
c.option '-n', '--disable_notify', "disable notification"
|
50
|
+
c.option '-r', '--release_note RELEASE_NOTE', "release note for distribution page"
|
51
|
+
c.option '-v', '--visibility (private|public)', "privacy setting ( require public for personal free account)"
|
48
52
|
|
49
53
|
c.action do |args, options|
|
50
54
|
determine_file! unless @file = options.file
|
@@ -56,11 +60,20 @@ command :'distribute:deploygate' do |c|
|
|
56
60
|
determine_deploygate_user_name! unless @user_name = options.user_name || ENV['DEPLOYGATE_USER_NAME']
|
57
61
|
say_error "Missing User Name" and abort unless @api_token
|
58
62
|
|
63
|
+
@message = options.message
|
64
|
+
@distribution_key = options.distribution_key || ENV['DEPLOYGATE_DESTRIBUTION_KEY']
|
65
|
+
@release_note = options.release_note
|
66
|
+
@disable_notify = ! options.disable_notify.nil? ? "yes" : nil
|
67
|
+
@visibility = options.visibility
|
59
68
|
@message = options.message
|
60
69
|
|
61
70
|
parameters = {}
|
62
71
|
parameters[:file] = @file
|
63
72
|
parameters[:message] = @message
|
73
|
+
parameters[:distribution_key] = @distribution_key if @distribution_key
|
74
|
+
parameters[:release_note] = @release_note if @release_note
|
75
|
+
parameters[:disable_notify] = @disable_notify if @disable_notify
|
76
|
+
parameters[:visibility] = @visibility if @visibility
|
64
77
|
parameters[:replace] = "true" if options.replace
|
65
78
|
|
66
79
|
client = Shenzhen::Plugins::DeployGate::Client.new(@api_token, @user_name)
|
data/lib/shenzhen/plugins/fir.rb
CHANGED
@@ -50,7 +50,7 @@ module Shenzhen::Plugins
|
|
50
50
|
end
|
51
51
|
|
52
52
|
options = {
|
53
|
-
:key => options['
|
53
|
+
:key => options['key'],
|
54
54
|
:token => options['token'],
|
55
55
|
:file => Faraday::UploadIO.new(ipa, 'application/octet-stream')
|
56
56
|
}
|
@@ -75,6 +75,8 @@ command :'distribute:fir' do |c|
|
|
75
75
|
c.option '-u', '--user_token TOKEN', "User Token. Available at http://fir.im/user/info"
|
76
76
|
c.option '-a', '--app_id APPID', "App Id (iOS Bundle identifier)"
|
77
77
|
c.option '-n', '--notes NOTES', "Release notes for the build"
|
78
|
+
c.option '-V', '--app_version VERSION', "App Version"
|
79
|
+
c.option '-S', '--short_version SHORT', "App Short Version"
|
78
80
|
|
79
81
|
c.action do |args, options|
|
80
82
|
determine_file! unless @file = options.file
|
@@ -89,6 +91,10 @@ command :'distribute:fir' do |c|
|
|
89
91
|
determine_notes! unless @notes = options.notes
|
90
92
|
say_error "Missing release notes" and abort unless @notes
|
91
93
|
|
94
|
+
determine_app_version! unless @app_version = options.app_version
|
95
|
+
|
96
|
+
determine_short_version! unless @short_version = options.short_version
|
97
|
+
|
92
98
|
client = Shenzhen::Plugins::Fir::Client.new(@user_token)
|
93
99
|
app_response = client.get_app_info(@app_id)
|
94
100
|
if app_response.status == 200
|
@@ -101,6 +107,8 @@ command :'distribute:fir' do |c|
|
|
101
107
|
|
102
108
|
app_response = client.update_app_info(oid, {
|
103
109
|
:changelog => @notes,
|
110
|
+
:version => @app_version,
|
111
|
+
:versionShort => @short_version
|
104
112
|
})
|
105
113
|
|
106
114
|
if app_response.status == 200
|
@@ -51,9 +51,11 @@ command :'distribute:hockeyapp' do |c|
|
|
51
51
|
c.option '-a', '--token TOKEN', "API Token. Available at https://rink.hockeyapp.net/manage/auth_tokens"
|
52
52
|
c.option '-i', '--identifier PUBLIC_IDENTIFIER', "Public identifier of the app you are targeting, if not specified HockeyApp will use the bundle identifier to choose the right"
|
53
53
|
c.option '-m', '--notes NOTES', "Release notes for the build (Default: Textile)"
|
54
|
-
c.option '-r', '--release RELEASE', [:
|
54
|
+
c.option '-r', '--release RELEASE', [:beta, :store, :alpha, :enterprise], "Release type: 0 - Beta, 1 - Store, 2 - Alpha , 3 - Enterprise"
|
55
55
|
c.option '--markdown', 'Notes are written with Markdown'
|
56
56
|
c.option '--tags TAGS', "Comma separated list of tags which will receive access to the build"
|
57
|
+
c.option '--teams TEAMS', "Comma separated list of team ID numbers to which this build will be restricted"
|
58
|
+
c.option '--users USERS', "Comma separated list of user ID numbers to which this build will be restricted"
|
57
59
|
c.option '--notify', "Notify permitted teammates to install the build"
|
58
60
|
c.option '--downloadOff', "Upload but don't allow download of this version just yet"
|
59
61
|
c.option '--mandatory', "Make this update mandatory"
|
@@ -81,15 +83,19 @@ command :'distribute:hockeyapp' do |c|
|
|
81
83
|
parameters[:notify] = "1" if options.notify && !options.downloadOff
|
82
84
|
parameters[:status] = options.downloadOff ? "1" : "2"
|
83
85
|
parameters[:tags] = options.tags if options.tags
|
86
|
+
parameters[:teams] = options.teams if options.teams
|
87
|
+
parameters[:users] = options.users if options.users
|
84
88
|
parameters[:dsym_filename] = @dsym if @dsym
|
85
89
|
parameters[:mandatory] = "1" if options.mandatory
|
86
90
|
parameters[:release_type] = case options.release
|
87
91
|
when :beta
|
88
92
|
"0"
|
89
|
-
when :
|
93
|
+
when :store
|
90
94
|
"1"
|
91
|
-
|
95
|
+
when :alpha
|
92
96
|
"2"
|
97
|
+
when :enterprise
|
98
|
+
"3"
|
93
99
|
end
|
94
100
|
parameters[:commit_sha] = options.commit_sha if options.commit_sha
|
95
101
|
parameters[:build_server_url] = options.build_server_url if options.build_server_url
|
@@ -17,7 +17,7 @@ module Shenzhen::Plugins
|
|
17
17
|
@account = account
|
18
18
|
@password = password
|
19
19
|
@params = params
|
20
|
-
@filename = File.basename(@ipa)
|
20
|
+
@filename = File.basename(@ipa).tr(" ", "_")
|
21
21
|
end
|
22
22
|
|
23
23
|
def upload_build!
|
@@ -105,7 +105,7 @@ command :'distribute:itunesconnect' do |c|
|
|
105
105
|
say_error "Missing Apple ID" and abort unless apple_id
|
106
106
|
|
107
107
|
@password = options.password || ENV['ITUNES_CONNECT_PASSWORD']
|
108
|
-
if @password
|
108
|
+
if @password.nil? && @password = Security::GenericPassword.find(:s => Shenzhen::Plugins::ITunesConnect::ITUNES_CONNECT_SERVER, :a => @account)
|
109
109
|
@password = @password.password
|
110
110
|
say_ok "Found password in keychain for account: #{@account}" if options.verbose
|
111
111
|
else
|
data/lib/shenzhen/version.rb
CHANGED
data/shenzhen-0.10.3.gem
ADDED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shenzhen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mattt Thompson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: commander
|
@@ -225,6 +225,7 @@ files:
|
|
225
225
|
- ./shenzhen-0.10.0.gem
|
226
226
|
- ./shenzhen-0.10.1.gem
|
227
227
|
- ./shenzhen-0.10.2.gem
|
228
|
+
- ./shenzhen-0.10.3.gem
|
228
229
|
- ./shenzhen.gemspec
|
229
230
|
- bin/ipa
|
230
231
|
homepage: http://nomad-cli.com
|