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 +4 -4
- data/lib/cocoapods-git2local/gem_version.rb +1 -1
- data/lib/pod/git.rb +11 -9
- data/lib/pod/pod.rb +4 -3
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3222223042f537c5f26abdf8a19020c36c51915f6317e186b537ff30d4d7c32b
|
4
|
+
data.tar.gz: 8d0a7a93a1aa5ea102ec2c50c2e08d2cf6a854802dc9e13aaab0bd026310a9ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 111ce9b2dcf27709543b7eccdc2381baaae2372381ce88c818da87085a2f1c8b1b0a6d41f50f6e1ccc17abc98cf8ceb027cbb48ca65a0b1581aca5a3dd47cee8
|
7
|
+
data.tar.gz: d0f035cc954b4a2f44830ea510ee52d313ba2282d88381bf1ea746d8ed5afc91eb12ba4c243915b5fb75e5cdabc903f6debf3fd7b5102f285f7ba8b23904a5a5
|
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
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
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.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- account120
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
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:
|
41
|
+
description: clone file for podfile use git.
|
42
42
|
email:
|
43
|
-
-
|
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:
|
76
|
+
summary: clone file for podfile use git.
|
77
77
|
test_files: []
|