pantograph 0.1.21 → 0.1.22

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6ca348c279806bde46f534a428dad6d124196e3f357142f972cad60f6483195a
4
- data.tar.gz: 8c9b6f569895f62af8982794cc77878ca87d94f9a247f5c9315c2dbae9756c13
3
+ metadata.gz: adcf59b0b204189a3fdb8175737842ae4973c6ca6e4f285c4f71a01d1489f610
4
+ data.tar.gz: 6f1b257a6d4c6965fbe453bac0771caf9ec3b65f6f1ea4f8e61b1048b59b1c9d
5
5
  SHA512:
6
- metadata.gz: 50db8a099bb06d02cbf94c7db25f5aeffc1a400398c2fbe4bfd8c67f978ecd4a8a380d343dc5a2024b585a033517e75d1465d9420fdafb060621a1de9b6521c7
7
- data.tar.gz: ed4bd0c8242447e1332b7b39e5241849467876fb898b43137d1a62fc6b523903c0aae60b63ceb9bae24a0b93bd6cca0270006ad3c0ed213cac80d14b577e498e
6
+ metadata.gz: cdb99faefb92d56eb72d8a71d4e3d788263394a85524ae7d99e45859cc0a49c2e742fc7f712e0a0ddfe9c9d989493425e7ecc2ee466785879172f4851f172d0d
7
+ data.tar.gz: 0377470c0d4c8a27240946363c70d8e8b74bb14d75d21c77e85e291e9001aade143cde344758862f32ca84339596274fbb19c98157e9b173d3f4ec3bb00d09c7
@@ -29,4 +29,3 @@ error do |_, error|
29
29
  next unless is_ci?
30
30
  slack(success: false, message: error)
31
31
  end
32
-
@@ -37,6 +37,12 @@ module Pantograph
37
37
  default_value: 'pantograph/Pantfile',
38
38
  optional: true
39
39
  ),
40
+ PantographCore::ConfigItem.new(
41
+ key: :dependencies,
42
+ description: 'Array of additional Pantfiles in the repository',
43
+ default_value: [],
44
+ optional: true
45
+ ),
40
46
  PantographCore::ConfigItem.new(
41
47
  key: :version,
42
48
  description: 'The version to checkout on the repository. Optimistic match operator or multiple conditions can be used to select the version within constraints',
@@ -48,7 +48,7 @@ module Pantograph
48
48
  end
49
49
 
50
50
  def self.details
51
- 'See [http://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner](http://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner) for details.'
51
+ 'See [http://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner](http://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner) for details.'
52
52
  end
53
53
 
54
54
  def self.available_options
@@ -266,7 +266,7 @@ module Pantograph
266
266
  # @param branch [String] The branch to checkout in the repository
267
267
  # @param path [String] The path to the Pantfile
268
268
  # @param version [String, Array] Version requirement for repo tags
269
- def import_from_git(url: nil, branch: 'master', path: 'pantograph/Pantfile', version: nil)
269
+ def import_from_git(url: nil, branch: 'master', path: 'pantograph/Pantfile', dependencies: [], version: nil)
270
270
  if url.to_s.length == 0
271
271
  UI.user_error!("Please pass the git url to the `import_from_git` action")
272
272
  end
@@ -283,6 +283,9 @@ module Pantograph
283
283
  Dir.mktmpdir('pant_clone') do |tmp_path|
284
284
  clone_folder = File.join(tmp_path, repo_name)
285
285
 
286
+ checkout_dependencies = dependencies.map(&:shellescape).join(" ")
287
+ checkout_path = "#{path.shellescape} #{checkout_dependencies}"
288
+
286
289
  UI.message('Cloning remote git repo...')
287
290
  Helper.with_env_values('GIT_TERMINAL_PROMPT' => '0') do
288
291
  Actions.sh("git clone #{url.shellescape} #{clone_folder.shellescape} --depth 1 -n --branch #{branch}")
@@ -295,7 +298,7 @@ module Pantograph
295
298
  UI.user_error!("No tag found matching #{version.inspect}") if checkout_param.nil?
296
299
  end
297
300
 
298
- Actions.sh("cd #{clone_folder.shellescape} && git checkout #{checkout_param.shellescape} #{path.shellescape}")
301
+ Actions.sh("cd #{clone_folder.shellescape} && git checkout #{checkout_param.shellescape} #{checkout_path}")
299
302
 
300
303
  # We also want to check out all the local actions of this pantograph setup
301
304
  containing = path.split(File::SEPARATOR)[0..-2]
@@ -308,12 +311,21 @@ module Pantograph
308
311
  # We don't care about a failure here, as local actions are optional
309
312
  end
310
313
 
311
- import(File.join(clone_folder, path))
314
+ return_value = nil
315
+
316
+ if dependencies.any?
317
+ return_value = [import(File.join(clone_folder, path))]
318
+ return_value += dependencies.map { |file_path| import(File.join(clone_folder, file_path)) }
319
+ else
320
+ return_value = import(File.join(clone_folder, path))
321
+ end
312
322
 
313
323
  action_completed(
314
324
  'import_from_git',
315
325
  status: PantographCore::ActionCompletionStatus::SUCCESS
316
326
  )
327
+
328
+ return return_value
317
329
  end
318
330
  end
319
331
  end
@@ -14,7 +14,7 @@ module Pantograph
14
14
  PantographCore::PantographFolder.create_folder!
15
15
 
16
16
  self.append_lane([
17
- "desc 'Runs all the tests'",
17
+ "desc 'Execute `test`, `build`, and `publish` lanes'",
18
18
  "lane :pipeline do",
19
19
  " test",
20
20
  " build",
@@ -22,16 +22,16 @@ module Pantograph
22
22
  "end"
23
23
  ])
24
24
  self.append_lane([
25
- "desc 'Runs all the tests'",
25
+ "desc 'Runs all the tests'",
26
26
  "lane :test do",
27
27
  " puts 'this is the test lane'",
28
28
  "end"
29
29
  ])
30
30
 
31
31
  self.append_lane([
32
- "desc 'Publish new version to Artifactory'",
32
+ "desc 'Build project with NPM'",
33
33
  "lane :build do",
34
- " sh('npm install')",
34
+ " puts 'this is the build lane'",
35
35
  "end"
36
36
  ])
37
37
 
@@ -1,5 +1,5 @@
1
1
  module Pantograph
2
- VERSION = '0.1.21'.freeze
2
+ VERSION = '0.1.22'.freeze
3
3
  SUMMARY = 'Another way to automate your apps'
4
4
  DESCRIPTION = 'A way to automate your apps, forked from Fastlane'.freeze
5
5
  RUBOCOP_REQUIREMENT = '0.49.1'.freeze
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pantograph
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.21
4
+ version: 0.1.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Knapp