cocoapods-modularization 0.2.8 → 0.3.0

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: a3a12f097e7b31fe8e67d928e874b47ccabba091ee0eb8deb5b57623510074f0
4
- data.tar.gz: a0712ffad6e90f6d741a4b32debbbe19eedc6500c0a85ea21169e8b310fe6a89
3
+ metadata.gz: d6dae46a5cc174c62cd41d9da33c9347e00de0ee7bb35a3f4aec4ac3788519bf
4
+ data.tar.gz: d0aa28534dda70eae9d1429178fbb765c347be715ef98a6eb3ec4e342bd1a991
5
5
  SHA512:
6
- metadata.gz: 410f0076ede68f37d65afa8dd42488fbd5ebeb2c320853f5fffdf745a3430706bc026a838f5a32ea185cf9b41587b42e005094153cc4966598c5f6a43683d9d3
7
- data.tar.gz: 0bb7c87a0eba0a5431cdf7aae9983c24d2ddc8bee4d73a244cefac49ab72dbc0c64bcb8715ba00566f5caf851c06a0ea35f3c494a7e8ab1314f126ac6f85728a
6
+ metadata.gz: ce29a7832c2d148a2be23eca915d5380b63494c00877715e8bc45129822f8c2abbad5886edb7cf045e14a4cbb8a39f53260c3185c0c56b09f9534e91453db1fb
7
+ data.tar.gz: 8b0f7ce3c57861a3eb2b143d8b1bf71092c12efccc482315009359072b4311e2b7a4a254c8ee82238b67f9796b26fac2de1a04b7d14f89bb977d9ee6dfa413dc
@@ -33,6 +33,7 @@ module Pod
33
33
  help! 'The Pod name cannot contain spaces.' if @name =~ /\s/
34
34
  help! 'The Pod name cannot contain plusses.' if @name =~ /\+/
35
35
  help! "The Pod name cannot begin with a '.'" if @name[0, 1] == '.'
36
+ help! "Path is needed" unless @path
36
37
  end
37
38
 
38
39
  def run
@@ -46,9 +47,7 @@ module Pod
46
47
  extend Executable
47
48
  executable :git
48
49
 
49
- TEMPLATE_REPO = 'https://github.com/CocoaPods/pod-template.git'.freeze
50
- TEMPLATE_INFO_URL = 'https://github.com/CocoaPods/pod-template'.freeze
51
- CREATE_NEW_POD_INFO_URL = 'https://guides.cocoapods.org/making/making-a-cocoapod'.freeze
50
+ TEMPLATE_REPO = 'git@gitlab.appshahe.com:shared-specs/template.git'.freeze
52
51
 
53
52
  def clone_template
54
53
  puts "Cloning `#{template_repo_url}` into `#{@name}`."
@@ -67,7 +66,6 @@ module Pod
67
66
 
68
67
  def print_info
69
68
  puts "\nTo learn more about the template see `#{template_repo_url}`."
70
- puts "To learn more about creating a new pod, see `#{CREATE_NEW_POD_INFO_URL}`."
71
69
  end
72
70
 
73
71
  def template_repo_url
@@ -47,7 +47,7 @@ module Pod
47
47
  FileUtils.rm_rf("#{Private::PrivateCache.root_path}/Repo")
48
48
  end
49
49
 
50
- system_build("/usr/bin/git clone #{repo_url} #{Private::PrivateCache.root_path}/Repo -b main --single-branch --depth 1")
50
+ system_build("/usr/bin/git clone #{repo_url} #{Private::PrivateCache.root_path}/Repo--single-branch --depth 1")
51
51
 
52
52
  # 遍历文件夹
53
53
  max_version = Dir.glob("#{Private::PrivateCache.root_path}/Repo/#{@name}/*").map { |e| Gem::Version.new(e.match(/\d{1,2}\.\d{1,2}\.\d{1,2}/).to_s) }.max.to_s
@@ -22,8 +22,16 @@ module Pod
22
22
  def initialize(argv)
23
23
  @name = argv.shift_argument
24
24
 
25
- version = Meta::MetaAccessor.version(@name)
26
- @version = argv.option('version', version_auto_increase(version))
25
+ version = argv.option('version', '')
26
+ if version.length == 0
27
+ current_version = Meta::MetaAccessor.version(@name)
28
+ @auto_increase = true
29
+ @version = version_auto_increase(current_version)
30
+ else
31
+ @auto_increase = false
32
+ @version = version
33
+ end
34
+
27
35
  super
28
36
  end
29
37
 
@@ -43,7 +51,9 @@ module Pod
43
51
  Meta::MetaAccessor.update_dep(@name, @version)
44
52
  UI.puts("#{@name} has been updated to #{@version}")
45
53
 
46
- Meta::MetaReference.encode_podfile
54
+ if @auto_increase
55
+ Meta::MetaReference.encode_podfile(@enable_branch)
56
+ end
47
57
  UI.puts("Podfile encoded")
48
58
  end
49
59
 
@@ -1,3 +1,3 @@
1
1
  module CocoapodsModularization
2
- VERSION = "0.2.8"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-modularization
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - lazy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-21 00:00:00.000000000 Z
11
+ date: 2023-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler