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 +4 -4
- data/lib/pod/command/bump-version.rb +6 -1
- data/lib/pod/command/push-tag.rb +13 -5
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a6f7fd3cb3987d6dda4bec08822c624be324d1a175a9e005406b4a0a1df5030
|
4
|
+
data.tar.gz: 3ce356ddb75a1584baed0a318eddfab8102c06a637aa93ebbfc03470766e031f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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*'
|
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
|
data/lib/pod/command/push-tag.rb
CHANGED
@@ -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
|
-
['--
|
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
|
-
@
|
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 &&
|
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.
|
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-
|
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.
|
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.
|
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
|