cocoapods-sync-podspecs 0.2.1 → 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: f0de672055103fbe0dcfbf3403e20ffa9fd813bc1f38dd5b2b23a6e8dfecb682
4
- data.tar.gz: 635efb0ad6c7ffca1acc1ae81e4cbec295e11378266eda1c24bf4ca399d2a529
3
+ metadata.gz: 4a6f7fd3cb3987d6dda4bec08822c624be324d1a175a9e005406b4a0a1df5030
4
+ data.tar.gz: 3ce356ddb75a1584baed0a318eddfab8102c06a637aa93ebbfc03470766e031f
5
5
  SHA512:
6
- metadata.gz: 4b1faf7947b048860d32af8aff454bbcaa3bcae643220e7a29044dd7204a801438d123bf88aad75998a1a9d6b16f09b18c5f11956102efbe590c1bbda5d0e862
7
- data.tar.gz: ae17ba30a36e14d6ba36fde922748f2aa59c3ab034a6b55475a4929fd8585af39c6328cf622b928f8425ed12def267262056832233eb827a4d5f8ff90e3ba6c8
6
+ metadata.gz: 0751a84c8dad4ee9bf31a556dc433ba288fa10c00ddc7874dc0f9e48e4ac663b17720e08ae38ff95367df2755d55c4d01c45e47e7f15a843f1b6838b6d9fd07d
7
+ data.tar.gz: 2697d13d1703cc7c7df86f65ec0ed32037d2bea9925e9cc3480872b5839602abd084bd594ac2ecc3b7a254bfd6586ad8dc3cfd29f44855bec250c6d3b7c184fe
@@ -61,7 +61,12 @@ module Pod
61
61
  File.open(path, "r+") do |f|
62
62
  s = ""
63
63
  f.each_line do |line|
64
- if line.to_s =~ /s\.version\s*=\s*'|"(\d+\.)?(\d+\.)?(\*|\d+)'|"/
64
+ if line.to_s =~ /s\.version\s*=\s*'(\d+\.)?(\d+\.)?(\*|\d+)'/
65
+ line = line.sub(/(\d+\.)?(\d+\.)?(\*|\d+)/) do |match|
66
+ version.to_s
67
+ end
68
+ end
69
+ if line.to_s =~ /s\.version\s*=\s*"(\d+\.)?(\d+\.)?(\*|\d+)"/
65
70
  line = line.sub(/(\d+\.)?(\d+\.)?(\*|\d+)/) do |match|
66
71
  version.to_s
67
72
  end
@@ -15,15 +15,17 @@ module Pod
15
15
 
16
16
  def self.options
17
17
  [
18
+ ['--commit-local', 'Make commit for bump version'],
18
19
  ['--push-remote', 'Perform the step of pushing REPO to its remote'],
19
- ['--stop-on-exists', 'Stop running when tag is existed'],
20
+ ['--continue-if-exists', 'Continues running when tag is existed'],
20
21
  ['--tag-on-change', 'Just push tag when podspec is changed'],
21
22
  ].concat(super)
22
23
  end
23
24
 
24
25
  def initialize(argv)
26
+ @commit_local = argv.flag?('commit-local', false)
25
27
  @tag_on_change = argv.flag?('tag-on-change', false)
26
- @stop_on_exists = argv.flag?('stop-on-exists', false)
28
+ @continue_if_exists = argv.flag?('continue-if-exists', false)
27
29
  @push_remote = argv.flag?('push-remote', false)
28
30
  @tag_version = argv.shift_argument
29
31
  @current_repo_dir = ''
@@ -41,17 +43,23 @@ module Pod
41
43
  end
42
44
 
43
45
  def run
46
+ processedPaths = Array.new
47
+
44
48
  podspec_files.each do |spec_file|
45
49
  spec = Pod::Specification.from_file(spec_file)
46
50
 
47
51
  @tag_version = spec.version.to_s unless !@tag_version.nil?
48
52
  @current_repo_dir = Pathname(spec_file).dirname
49
53
 
54
+ next if processedPaths.include?(@current_repo_dir)
55
+
56
+ processedPaths.push(@current_repo_dir)
57
+
50
58
  # check_repo_status(spec.name, Pathname(spec_file).dirname)
51
59
  # update_repo(spec.name, Pathname(spec_file).dirname)
52
60
 
53
61
  exists_tag = pod_repo_git('tag').include?(@tag_version)
54
- if exists_tag && @stop_on_exists
62
+ if exists_tag && !@continue_if_exists
55
63
  raise Informative, "#{spec.name}: tag #{@tag_version} already exists"
56
64
  end
57
65
 
@@ -67,8 +75,8 @@ module Pod
67
75
 
68
76
  # only commit if modified
69
77
  if pod_repo_git('status', '--porcelain').include?(podspec_name)
70
- pod_repo_git('add', '*.podspec')
71
- pod_repo_git('commit', '--no-verify', '-m', message)
78
+ pod_repo_git('add', '*.podspec') unless !@commit_local
79
+ pod_repo_git('commit', '--no-verify', '-m', message) unless !@commit_local
72
80
  push_pod_repo(name) unless !@push_remote
73
81
 
74
82
  pod_repo_git('tag', '-a', @tag_version, '-m', message)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-sync-podspecs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - quangmv
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-06 00:00:00.000000000 Z
11
+ date: 2021-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.10.0
19
+ version: 1.11.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.10.0
26
+ version: 1.11.0
27
27
  description: Push new specifications to a spec-repo without lint validation
28
28
  email:
29
29
  - quang.app@gmail.com