fastlane-plugin-rome 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6695cdc9e131a778464ddeb2b93d34fb84a07185
4
- data.tar.gz: b022c43883af6abc6299daad3250ccd763e8085b
3
+ metadata.gz: 223741190466848729445c8291e87d3887a8f751
4
+ data.tar.gz: 4d570fed49f21f2c563add77a6fb0ddbd9bc0bbc
5
5
  SHA512:
6
- metadata.gz: b0effb25cda6393fb66b74b95d384a1c16483ec29d13dad19f9446fbeaa6b016ae8fcf5a5caafcc3330add9fc98d6b545b8b06cde18163412abf662b4e8512fa
7
- data.tar.gz: 1506da48eeb23ea4b4c9053ea29b3018885b024d5e7c18217a478bee9e1bf5f9d459a94edee2f4ed4d5c6b2c2ae37435c8b891e377727b085d8f16ad4770a2ef
6
+ metadata.gz: ad4aabef1b38a84badb3ffe2cc259ee67e3c268d4ed258af5bafe652e34a8ccf0570fbff8ec2b2450eb6cba0ec0417f7749352d69062ead72c56bb4143e9d07c
7
+ data.tar.gz: 6bc96d3c55d996e091c981fc8f786141e347eefa5d822f73457d84bb9ac24b3130a063e3b19ace8781166d83adae141bdf7e3e6a4683d2b115c579e5df68ca33
@@ -23,11 +23,28 @@ module Fastlane
23
23
  end
24
24
 
25
25
  cmd << "--platform #{params[:platform]}" if params[:platform]
26
+ cmd << "--cache-prefix #{params[:cacheprefix]}" if params[:cacheprefix]
26
27
  cmd << "-v " if params[:verbose]
27
28
 
28
29
  Actions.sh(cmd.join(' '))
29
30
  end
30
31
 
32
+ def self.meet_minimum_version(minimum_version)
33
+ version = Actions.sh('rome --version') #i.e. 0.12.0.31 - Romam uno die non fuisse conditam.
34
+ version_number = version.split(' - ')[0]
35
+
36
+ minimum_version_parts = minimum_version.split('.')
37
+ version_parts = version_number.split('.')
38
+ for i in 0..version_parts.length do
39
+ part = version_parts[i]
40
+ min_part = minimum_version_parts[i]
41
+ if part.to_i < min_part.to_i
42
+ return false
43
+ end
44
+ end
45
+ return true
46
+ end
47
+
31
48
  def self.validate(params)
32
49
  unless params
33
50
  Actions.sh("rome --help")
@@ -115,7 +132,17 @@ module Fastlane
115
132
  description: "Framework name or names to upload/download, could be applied only along with the 'upload' or 'download' commands",
116
133
  default_value: [],
117
134
  is_string: false,
118
- type: Array)
135
+ type: Array),
136
+
137
+ FastlaneCore::ConfigItem.new(key: :cacheprefix,
138
+ env_name: "FL_ROME_CACHE_PREFIX",
139
+ description: "Allow a prefix for top level directories to be specified for all commands. Useful to store frameworks built with different Swift versions",
140
+ optional: true,
141
+ is_string: true,
142
+ verify_block: proc do |value|
143
+ UI.user_error!("Requires Rome version '0.12.0.31' or later") if !meet_minimum_version("0.12.0.31")
144
+ end)
145
+
119
146
  ]
120
147
  end
121
148
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Rome
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-rome
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - François Benaiteau
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-27 00:00:00.000000000 Z
11
+ date: 2017-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry