fastlane-plugin-xamarin_build 0.1.2 → 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 +4 -4
- checksums.yaml.gz.asc +7 -7
- data.tar.gz.asc +7 -7
- data/lib/fastlane/plugin/xamarin_build/actions/xamarin_build_action.rb +119 -11
- data/lib/fastlane/plugin/xamarin_build/actions/xamarin_update_configuration.rb +3 -3
- data/lib/fastlane/plugin/xamarin_build/version.rb +1 -1
- metadata +2 -16
- metadata.gz.asc +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2d2d1abf6a1fdcf598e61fa8da240d8b5d400fd
|
4
|
+
data.tar.gz: 54f08f7c1c9c969af3322dbdf943edce85410dec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28d81d07f6c1d17fe5513dd8b24715388d52bf4960a49cb3f47a5dcf359d2c62bf2dd31bae2f89c6cddc1049bdc8c788fce4c6a9e3d03c3ca4b1ba01d068dbd1
|
7
|
+
data.tar.gz: 938bbf79b4cd20fad49e4051cfb489d373510180eea1dd9e4da7fe7eb6b46a09150c1b510930144047a2244790266256e8dccfe566ad4bf9596e151607e21b53
|
checksums.yaml.gz.asc
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
-----BEGIN PGP SIGNATURE-----
|
2
2
|
Version: GnuPG v1
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
=
|
4
|
+
iQEcBAABAgAGBQJXhN7rAAoJEAPmZ1UHrajBWj8H/1a26D074DfqufLFKcF2GZz7
|
5
|
+
nHC+RDgUzl+MuX+GoubsaIjD9ZeMQbrso+o+1bwKiSWEJgE3diwSAk8SGFB8kcke
|
6
|
+
Dr+YAJacjT48x1/LxG5paHbqF5Qp5VQDdzVUXI8Dr4HugOpjB4zMyQdP9v++Fmr8
|
7
|
+
sPouOAh3+gkrFLx7O9MgyocV7r32KeYxAkUy+eh7EfshAbaV93e5NlczS1to3btB
|
8
|
+
a+tzzpDbmNnma9KjoKE1pICA2IgwX/WANkLqBxVhgF+SVsflMQc/KJOsuyWKe/31
|
9
|
+
VmcUdoGyGEAny3bcZvuq6LjxS5tSJ+QF7vFXOLW3aVjaFC/1rcHUrRvWidBomd0=
|
10
|
+
=lrv2
|
11
11
|
-----END PGP SIGNATURE-----
|
data.tar.gz.asc
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
-----BEGIN PGP SIGNATURE-----
|
2
2
|
Version: GnuPG v1
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
=
|
4
|
+
iQEcBAABAgAGBQJXhN7qAAoJEAPmZ1UHrajBmMMH/1KwLb/0FI9jwOrJ7lZVqJ8+
|
5
|
+
PqMDP9LSXyLKwnm9pEcLDPNOHEeOsDTlfOzM82+BDDpZ58UKHeEZhRDbiFWDnAp/
|
6
|
+
OIPOuTfMSTqMm3dgq2MKPxwdvDEE4rO2ZH+e+zsRTmJbUtRrFUug0kXvu0wJMNXQ
|
7
|
+
XnpQiDtczfBw+znZIiJswQFiy+lsZ/XN15k6UwDJXGBdJnK+BiwxrXqjzMA4mmP6
|
8
|
+
BDSDA/ACu/dkztPtK+dsImfGFAhT/xR1YvyJOmFIyS3vOKev0cZP/pLI3iWrnuAZ
|
9
|
+
ucmsEs54HTpDj8RE489OG6L8/668VOkpon03xrUJLmnGOTciJRXmozzyLoFNJVo=
|
10
|
+
=XsyR
|
11
11
|
-----END PGP SIGNATURE-----
|
@@ -2,22 +2,85 @@ module Fastlane
|
|
2
2
|
module Actions
|
3
3
|
class XamarinBuildAction < Action
|
4
4
|
MDTOOL = '/Applications/Xamarin\ Studio.app/Contents/MacOS/mdtool'.freeze
|
5
|
+
XBUILD = '/Library/Frameworks/Mono.framework/Commands/xbuild'.freeze
|
5
6
|
|
6
7
|
def self.run(params)
|
7
8
|
platform = params[:platform]
|
8
|
-
|
9
|
+
project = params[:project]
|
9
10
|
|
10
|
-
|
11
|
-
|
11
|
+
projects = (params[:projects] or '').split(',').select do |item|
|
12
|
+
item.size > 0
|
13
|
+
end
|
14
|
+
|
15
|
+
projects << project if project != nil
|
16
|
+
projects = projects.uniq
|
12
17
|
|
13
|
-
|
18
|
+
if params[:build_util] == 'mdtool'
|
19
|
+
if projects.size > 0
|
20
|
+
mdtool_build_projects(params, projects)
|
21
|
+
else
|
22
|
+
mdtool_build_solution(params)
|
23
|
+
end
|
24
|
+
else
|
25
|
+
if projects.size > 0
|
26
|
+
puts "echo 'not supported yet'"
|
27
|
+
else
|
28
|
+
xbuild_build_solution(params)
|
29
|
+
end
|
30
|
+
end
|
14
31
|
|
15
|
-
|
16
|
-
|
32
|
+
build_type = params[:build_type]
|
33
|
+
solution = params[:solution]
|
34
|
+
get_build_path(platform, build_type, solution)
|
35
|
+
end
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
def self.mdtool_build_projects(params, projects)
|
40
|
+
platform = params[:platform]
|
41
|
+
build_type = params[:build_type]
|
42
|
+
target = params[:target]
|
43
|
+
solution = params[:solution]
|
44
|
+
|
45
|
+
for project in projects
|
46
|
+
configuration = "--configuration:#{build_type}|#{platform}"
|
47
|
+
command = "#{MDTOOL} build -t:#{target} -p:#{project} #{solution} \"#{configuration}\""
|
48
|
+
Helper::XamarinBuildHelper.bash(command, !params[:print_all])
|
49
|
+
end
|
17
50
|
|
18
|
-
get_build_path(platform, build_type, params[:solution])
|
19
51
|
end
|
20
52
|
|
53
|
+
def self.xbuild_build_solution(params)
|
54
|
+
platform = params[:platform]
|
55
|
+
build_type = params[:build_type]
|
56
|
+
target = params[:target]
|
57
|
+
solution = params[:solution]
|
58
|
+
|
59
|
+
command = "#{XBUILD} "
|
60
|
+
command << "/target:#{target} " if target != nil
|
61
|
+
command << "/p:Platform=#{platform} " if platform != nil
|
62
|
+
command << "/p:Configuration=#{build_type} " if build_type != nil
|
63
|
+
command << solution
|
64
|
+
|
65
|
+
Helper::XamarinBuildHelper.bash(command, !params[:print_all])
|
66
|
+
end
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
def self.mdtool_build_solution(params)
|
73
|
+
platform = params[:platform]
|
74
|
+
build_type = params[:build_type]
|
75
|
+
target = params[:target]
|
76
|
+
solution = params[:solution]
|
77
|
+
|
78
|
+
configuration = "--configuration:#{build_type}|#{platform}"
|
79
|
+
command = "#{MDTOOL} build -t:#{target} #{solution} \"#{configuration}\""
|
80
|
+
Helper::XamarinBuildHelper.bash(command, !params[:print_all])
|
81
|
+
end
|
82
|
+
|
83
|
+
# Returns bin path for given platform and build_type or nil
|
21
84
|
def self.get_build_path(platform, build_type, solution)
|
22
85
|
root = File.dirname(solution)
|
23
86
|
|
@@ -40,8 +103,13 @@ module Fastlane
|
|
40
103
|
['punksta']
|
41
104
|
end
|
42
105
|
|
43
|
-
|
106
|
+
BUILD_TYPES = %w(Release Debug).freeze
|
107
|
+
TARGET_TYPES = %w(Build Clean).freeze
|
44
108
|
PRINT_ALL = [true, false].freeze
|
109
|
+
BUILD_UTIL = [
|
110
|
+
'xbuild',
|
111
|
+
'mdtool'
|
112
|
+
].freeze
|
45
113
|
|
46
114
|
def self.available_options
|
47
115
|
[
|
@@ -61,13 +129,24 @@ module Fastlane
|
|
61
129
|
type: String
|
62
130
|
),
|
63
131
|
|
132
|
+
FastlaneCore::ConfigItem.new(
|
133
|
+
key: :build_type,
|
134
|
+
env_name: 'FL_XAMARIN_BUILD_TYPE',
|
135
|
+
description: 'Release or Debug',
|
136
|
+
type: String,
|
137
|
+
verify_block: proc do |value|
|
138
|
+
UI.user_error!("Unsupported build type! Use one of #{BUILD_TYPES.join '\' '}".red) unless BUILD_TYPES.include? value
|
139
|
+
end
|
140
|
+
),
|
141
|
+
|
64
142
|
FastlaneCore::ConfigItem.new(
|
65
143
|
key: :target,
|
66
144
|
env_name: 'FL_XAMARIN_BUILD_TARGET',
|
67
|
-
description: '
|
145
|
+
description: 'Clean or Build',
|
68
146
|
type: String,
|
147
|
+
default_value: 'Build',
|
69
148
|
verify_block: proc do |value|
|
70
|
-
UI.user_error!("Unsupported
|
149
|
+
UI.user_error!("Unsupported target! Use one of #{TARGET_TYPES.join '\' '}".red) unless TARGET_TYPES.include? value
|
71
150
|
end
|
72
151
|
),
|
73
152
|
|
@@ -79,13 +158,42 @@ module Fastlane
|
|
79
158
|
is_string: false,
|
80
159
|
optional: true,
|
81
160
|
verify_block: proc do |value|
|
82
|
-
UI.user_error!("Unsupported
|
161
|
+
UI.user_error!("Unsupported value! Use one of #{PRINT_ALL.join '\' '}".red) unless PRINT_ALL.include? value
|
83
162
|
end
|
163
|
+
),
|
164
|
+
|
165
|
+
FastlaneCore::ConfigItem.new(
|
166
|
+
key: :build_util,
|
167
|
+
env_name: 'FL_XAMARIN_BUILD_BUILD_UTIL',
|
168
|
+
description: 'Build util which use to build project. mdtool',
|
169
|
+
default_value: 'mdtool',
|
170
|
+
is_string: false,
|
171
|
+
optional: true,
|
172
|
+
verify_block: proc do |value|
|
173
|
+
UI.user_error!("Unsupported build util! Une of #{BUILD_UTIL.join '\' '}".red) unless BUILD_UTIL.include? value
|
174
|
+
end
|
175
|
+
),
|
176
|
+
|
177
|
+
FastlaneCore::ConfigItem.new(
|
178
|
+
key: :project,
|
179
|
+
env_name: 'FL_XAMARIN_BUILD_PROJECT',
|
180
|
+
description: 'Project to build or clean',
|
181
|
+
is_string: true,
|
182
|
+
optional: true
|
183
|
+
),
|
184
|
+
|
185
|
+
FastlaneCore::ConfigItem.new(
|
186
|
+
key: :projects,
|
187
|
+
env_name: 'FL_XAMARIN_BUILD_PROJECTS',
|
188
|
+
description: 'Projects to build or clean, separated by ,',
|
189
|
+
is_string: true,
|
190
|
+
optional: true
|
84
191
|
)
|
85
192
|
]
|
86
193
|
end
|
87
194
|
|
88
195
|
def self.is_supported?(platform)
|
196
|
+
# android not tested
|
89
197
|
[:ios, :android].include?(platform)
|
90
198
|
end
|
91
199
|
end
|
@@ -14,7 +14,7 @@ module Fastlane
|
|
14
14
|
doc = Nokogiri::XML(file.read)
|
15
15
|
file.close
|
16
16
|
|
17
|
-
configuration = "'#{params[:
|
17
|
+
configuration = "'#{params[:build_type]}|#{params[:platform]}'"
|
18
18
|
|
19
19
|
doc.search('PropertyGroup').each do |group|
|
20
20
|
next unless !group['Condition'].nil? && group['Condition'].include?(configuration)
|
@@ -54,12 +54,12 @@ module Fastlane
|
|
54
54
|
UI.user_error!('Project file not found') unless File.exist? value
|
55
55
|
end),
|
56
56
|
|
57
|
-
FastlaneCore::ConfigItem.new(key: :
|
57
|
+
FastlaneCore::ConfigItem.new(key: :build_type,
|
58
58
|
env_name: 'FL_XAMARIN_UPDATE_CONFIGURATION_TARGET',
|
59
59
|
description: 'Target of configuration PropertyGroup',
|
60
60
|
is_string: true,
|
61
61
|
verify_block: proc do |value|
|
62
|
-
UI.user_error!("Unsupported
|
62
|
+
UI.user_error!("Unsupported build_type! Use one of #{TARGET}") unless TARGET.include? value
|
63
63
|
end),
|
64
64
|
|
65
65
|
FastlaneCore::ConfigItem.new(key: :platform,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-xamarin_build
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- punksta
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -52,20 +52,6 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 0.1.0
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: openssl
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :runtime
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: pry
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.asc
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
-----BEGIN PGP SIGNATURE-----
|
2
2
|
Version: GnuPG v1
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
=
|
4
|
+
iQEcBAABAgAGBQJXhN7GAAoJEAPmZ1UHrajBmHIIAKP3a0C5GocWI+6XQSTxJ7LW
|
5
|
+
cAnpE5doLIE0C0FeTF7Lunq9zX4qLEzKjuLG/IoHQhpj/tuwM3H6BWmKLL2wOkV0
|
6
|
+
MTpvkzSChsRVqBxA25dwYZGWWE9QFUFK3P8GnwiqeNVvCj/DDed/nXJfwX/9I9mx
|
7
|
+
4AyZi0/fj5HPfwPRgdxpBfIrgkO532Xb/JwYPGLhn0m3GVU3MNEnZfBHnAgNd4Bw
|
8
|
+
V0ofnJuCW552ZZcC2Oxu5Q9eoLmiiKR13G64WMAzZ0YHMKqbUPH8HcIOS5YpG0kz
|
9
|
+
VGZxnBdv8HRMJ9jC5AJWURQPCAA8h2VXrFT11cNmVDNwLNsUbxElobVO2wIjjog=
|
10
|
+
=dQKU
|
11
11
|
-----END PGP SIGNATURE-----
|