pod-pipeline 0.5.5 → 0.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0725da77276ed71d4530f1b53762f60ceca35e7e6fda05003b663fffa0dd9a55
4
- data.tar.gz: e71b1e5a402915e0c47c2b80ff28445fd644af233fbb9244010f3adf2bf6872f
3
+ metadata.gz: 7fbd23977836c8304f119e084ffd3cf0f87921d3334da995d64bebf4da292014
4
+ data.tar.gz: c16a55398d8dabcd46ea2c84c210d9d94c804f4c01ddc71169de1240932d5737
5
5
  SHA512:
6
- metadata.gz: 12a13fc9b13d88639fdf52cb157d72c2f73dcea09b35b17562d9e6d9b027d23478e583f97ad936264947102f2e033a99e6c9cc5583efbbc79dad8689a3ee3e16
7
- data.tar.gz: a3cef435c51b828c2aa3f4cde3ba71c95d067aae2ab943ec5bbf52e6c8bbe49385b0a80cc16f2cb68f4cd6c7f7257e79fbd6b2c463ee738c41fdb7db7d6372bc
6
+ metadata.gz: 0542201f03feb3de6cb8719db8c6bd47172343666a29f58c72425323566eb1a0367194c5a5a9f7c55e02edbd5e3b397c8c791a4efdbb7dbd95e09a62a2565e79
7
+ data.tar.gz: 5047175beed47d81de9f96f016e70b4acec1bbd60be78b3700c1a17b5cdcda8d122bcec903cd555944eefb2293cb3fbf3f8d42e754a8cafad94edd6daed23f77
@@ -66,12 +66,8 @@ module PPL
66
66
  def update_version
67
67
  version = PPL::Scanner.linter.spec.version
68
68
  raise "版本号异常,无法更新" unless version
69
- if @new_version
70
- version.archiving(@new_version)
71
- else
72
- version.increase_patch
73
- end
74
-
69
+
70
+ version.increase(@new_version)
75
71
  PPL::Scanner.linter.write_to_file('version', version.version)
76
72
  end
77
73
 
@@ -90,4 +86,4 @@ module PPL
90
86
  end
91
87
  end
92
88
  end
93
- end
89
+ end
@@ -1,33 +1,12 @@
1
1
  module Pod
2
2
  class Version
3
- def increase_major
4
- numeric_segments[0] = numeric_segments[0].to_i + 1
5
- archiving(numeric_joint(numeric_segments))
6
- end
7
-
8
- def increase_minor
9
- numeric_segments[1] = numeric_segments[1].to_i + 1
10
- archiving(numeric_joint(numeric_segments))
11
- end
12
-
13
- def increase_patch
14
- numeric_segments[2] = numeric_segments[2].to_i + 1
15
- archiving(numeric_joint(numeric_segments))
16
- end
17
-
18
- def numeric_joint(numeric_segments)
19
- archive = ""
20
- numeric_segments.each {|numeric|
21
- if numeric.nil?
22
- numeric = 0
23
- end
24
- archive += '.' + numeric.to_s
25
- }
26
- archive.slice!(0)
27
- return archive
28
- end
29
-
30
- def archiving(new_version)
3
+ def increase(new_version = nil)
4
+ unless new_version
5
+ versions = @version.split('.')
6
+ versions.push((versions.pop.to_i + 1).to_s)
7
+ new_version = versions.join('.')
8
+ end
9
+
31
10
  puts "[修改版本号:#{version} => #{new_version}]"
32
11
  @version = new_version
33
12
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pod-pipeline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - 郑贤达
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-17 00:00:00.000000000 Z
11
+ date: 2023-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods-core