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 +4 -4
- data/pantograph/lib/assets/DefaultPantfileTemplate +0 -1
- data/pantograph/lib/pantograph/actions/import_from_git.rb +6 -0
- data/pantograph/lib/pantograph/actions/sonar.rb +1 -1
- data/pantograph/lib/pantograph/pant_file.rb +15 -3
- data/pantograph/lib/pantograph/setup/setup_angular.rb +4 -4
- data/pantograph/lib/pantograph/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adcf59b0b204189a3fdb8175737842ae4973c6ca6e4f285c4f71a01d1489f610
|
4
|
+
data.tar.gz: 6f1b257a6d4c6965fbe453bac0771caf9ec3b65f6f1ea4f8e61b1048b59b1c9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cdb99faefb92d56eb72d8a71d4e3d788263394a85524ae7d99e45859cc0a49c2e742fc7f712e0a0ddfe9c9d989493425e7ecc2ee466785879172f4851f172d0d
|
7
|
+
data.tar.gz: 0377470c0d4c8a27240946363c70d8e8b74bb14d75d21c77e85e291e9001aade143cde344758862f32ca84339596274fbb19c98157e9b173d3f4ec3bb00d09c7
|
@@ -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} #{
|
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
|
-
|
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 '
|
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
|
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 '
|
32
|
+
"desc 'Build project with NPM'",
|
33
33
|
"lane :build do",
|
34
|
-
"
|
34
|
+
" puts 'this is the build lane'",
|
35
35
|
"end"
|
36
36
|
])
|
37
37
|
|