cocoapods-git2local 0.0.1 → 0.0.2

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
  SHA256:
3
- metadata.gz: daa3dc5adb1b9c9652fef33c34d417c5e1251f9a743525be7960d0862c6eca13
4
- data.tar.gz: d2c3d689ee0a01bcb29405328a7950f6a58568b31ea5a669f4b32d973774736e
3
+ metadata.gz: 3222223042f537c5f26abdf8a19020c36c51915f6317e186b537ff30d4d7c32b
4
+ data.tar.gz: 8d0a7a93a1aa5ea102ec2c50c2e08d2cf6a854802dc9e13aaab0bd026310a9ee
5
5
  SHA512:
6
- metadata.gz: bcb0bafbe72b5e92afb0b4d28ba5d40951d6efdd12b0f05349dba44e9634e43e678986f1617c31a17424b92e33bc9a4ed6cf93751800e7eb66d2a914a4e02966
7
- data.tar.gz: 30baef453dfbae00cfb198803b2aedeee43fed92bf1a60cd6da650e6581b3871f93a2d3db60d8441f75237df39e5baa899bc1c466384edbcc5a507e8268c8ef5
6
+ metadata.gz: 111ce9b2dcf27709543b7eccdc2381baaae2372381ce88c818da87085a2f1c8b1b0a6d41f50f6e1ccc17abc98cf8ceb027cbb48ca65a0b1581aca5a3dd47cee8
7
+ data.tar.gz: d0f035cc954b4a2f44830ea510ee52d313ba2282d88381bf1ea746d8ed5afc91eb12ba4c243915b5fb75e5cdabc903f6debf3fd7b5102f285f7ba8b23904a5a5
@@ -1,3 +1,3 @@
1
1
  module CocoapodsGit2local
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/pod/git.rb CHANGED
@@ -1,18 +1,20 @@
1
- def gitclone(git, commit)
1
+ def gitclone(git, branch, commit)
2
2
  component = git.split("/")[4].split(".")[0]
3
3
  pwd = Dir.pwd
4
4
  Dir.chdir("..")
5
5
  if File.directory?(component)
6
6
  Dir.chdir(component)
7
7
  p Dir.pwd
8
- reset = 'yes'
9
8
  unless system("git status | grep 'nothing to commit'")
10
- p component + "有未提交的修改"
11
- reset = gets
12
- end
13
- if reset == 'yes'
14
- system("git reset --hard " + commit)
15
- system("git checkout " + commit)
9
+ puts 'sssss'
10
+ else
11
+ system("git reset --hard")
12
+ if branch
13
+ system("git checkout " + branch)
14
+ system("git pull")
15
+ else
16
+ system("git checkout " + commit)
17
+ end
16
18
  end
17
19
  else
18
20
  system("git clone " + git)
@@ -20,6 +22,6 @@ def gitclone(git, commit)
20
22
  p Dir.pwd
21
23
  system("git checkout " + commit)
22
24
  end
23
-
25
+
24
26
  Dir.chdir(pwd)
25
27
  end
data/lib/pod/pod.rb CHANGED
@@ -21,13 +21,14 @@ module Pod
21
21
  end
22
22
  # link = Pod::Command::Links.get_link(linked_name)
23
23
  unless requirements[0].instance_of? String
24
- unless requirements[0].key?(:git) && requirements[0].key?(:commit)
24
+ unless requirements[0].key?(:git) && (requirements[0].key?(:commit) || requirements[0].key?(:branch))
25
25
  real_pod(name, *requirements, &block)
26
26
  else
27
27
  git = requirements[0].fetch(:git)
28
- commit = requirements[0].fetch(:commit)
28
+ commit = requirements[0].key?(:commit) ? requirements[0].fetch(:commit) : nil
29
+ branch = requirements[0].key?(:branch) ? requirements[0].fetch(:branch) : nil
29
30
  component = git.split("/")[4].split(".")[0]
30
- gitclone(git, commit)
31
+ gitclone(git, branch, commit)
31
32
  real_pod(name, :path=>"../"+component+"/", &block)
32
33
  end
33
34
  else
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-git2local
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
- - hujunjian
7
+ - account120
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-13 00:00:00.000000000 Z
11
+ date: 2022-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -38,9 +38,9 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- description: A short description of cocoapods-git2local.
41
+ description: clone file for podfile use git.
42
42
  email:
43
- - hujunjian@meituan.com
43
+ - 979812871@qq.com
44
44
  executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
@@ -73,5 +73,5 @@ requirements: []
73
73
  rubygems_version: 3.0.9
74
74
  signing_key:
75
75
  specification_version: 4
76
- summary: A longer description of cocoapods-git2local.
76
+ summary: clone file for podfile use git.
77
77
  test_files: []