cocoapods-hbh 0.1.9 → 0.2.1

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: 8bad5c1b8ce197c38234be5e45fbd18308cae43d59cf347945d0ebec29c5fdbe
4
- data.tar.gz: 5ee039ad7e1c47dc8965d444f03290e4f069bb34ca48ac3de7c8f1ed97bd91fd
3
+ metadata.gz: 692edd1cb38988e758a533dc898231f1f3d2f1268e8c7473e72492d06215e8fd
4
+ data.tar.gz: 3c85b2794d671fde906f3d562aff66feb3eedb9e66d5adb36c1a6e0063ccbce3
5
5
  SHA512:
6
- metadata.gz: 75b416f95ddf8bcf7078f0e82b445d06d32a962a5d627667ba965d7d999ef2def5143b192ee723f090195c76fec228cbf47df076be11aa3d779bee4cdd15955e
7
- data.tar.gz: 66e6b44209cd8a26c27fd59b6ccbaf41e5b056ca4972512d770ab24ce4a9f783719fc51a98c7c417cf124b8d04c76b24be929065e06f8aeee40bad20390ba3a9
6
+ metadata.gz: 3b714bb0b8635a7fc35e6166eeef4a3310be4f2908dfa11e31d9b96589b4a0234cf632eef5bb2d6cf72177c141a8a533b8bddaddf0e95086b60d83f5897c104e
7
+ data.tar.gz: 73e6ad7d8dcebf8e7e8948405b719616e9b453f37a611b482b26f14040d445e1df282574a91a2b17e3c164784f6c595ea5c436b23eeaf6f8a4fee10905b8683d
@@ -83,7 +83,7 @@ module Pod
83
83
  end
84
84
  end
85
85
  if moduleTag != nil and !moduleTag.empty?
86
- result = system("cd #{path_module} && git fetch origin #{moduleTag} && git checkout #{moduleTag}")
86
+ result = system("cd #{path_module} && git fetch origin tag #{moduleTag} && git checkout #{moduleTag}")
87
87
  raise "发生错误" unless result
88
88
  # `cd #{path_module} && git fetch && git checkout #{moduleTag}`
89
89
  # Pod::UI.puts "发生错误#{result}".red
@@ -1,3 +1,3 @@
1
1
  module CocoapodsHbh
2
- VERSION = "0.1.9"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -47,17 +47,27 @@ module Pod
47
47
  if !File.exist?(git_hooks_path)
48
48
  FileUtils.mkdir_p git_hooks_path
49
49
  end
50
- FileUtils.cp_r(hooks_path, git_hooks_path)
51
- FileUtils.chmod("+x", "#{git_hooks_path}/#{file_name}")
50
+
51
+ copyHookAndChmod(hooks_path, git_hooks_path, file_name)
52
52
  findSubmodulesHooks(hooks_path, git_path, file_name)
53
53
  end
54
54
 
55
55
  def findSubmodulesHooks (git_hooks_path, git_path, file_name)
56
56
  subGitHookPath = walk(git_path)
57
57
  subGitHookPath.each do |path|
58
+ copyHookAndChmod(git_hooks_path, path, file_name)
59
+ end
60
+ end
61
+
62
+ def copyHookAndChmod(git_hooks_path, path, file_name)
63
+ if File.exist?("#{path}/#{file_name}")
64
+ # Pod::UI.puts "文件已经存在#{path}/#{file_name}"
65
+ return
66
+ else
58
67
  FileUtils.cp_r(git_hooks_path, path)
59
68
  FileUtils.chmod("+x", "#{path}/#{file_name}")
60
69
  end
70
+
61
71
  end
62
72
 
63
73
  def walk (startPath, dirName = "hooks", first = true)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-hbh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - zanju
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-30 00:00:00.000000000 Z
11
+ date: 2022-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel