fastlane-craft 1.3.4 → 1.3.5

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: 4aa470cfc581e71d76e685c685b9fe1dc9440e556f95c968e19c884d46c92b4e
4
- data.tar.gz: 3781ecaa118d7873d538b6e4ec076706fc330d5432b0f5d33d614b17c2bf819b
3
+ metadata.gz: 3925e6b6e39541796abce439e781b02b0d4bb4e891536cff80df4106d4c90656
4
+ data.tar.gz: dcabea7835bb7ff3792e6655131f1ca624bf8b874219c58faadccd17d680fb04
5
5
  SHA512:
6
- metadata.gz: ababbd248bb2f7c3abad3914227f1615609e19f46af1cd52005dd3660b887bb0e08a2f17a16534ac0b5a5675b1967a0b5a124c1aece7259ffec4ec84e885f725
7
- data.tar.gz: 9c0c52e4e010ee500591fb17f3159b991bea660d9813408d560a74c04cba1b876d54554a7e3ac53e5149062d418f51970752669406af867937e28724785745a6
6
+ metadata.gz: 8f1d5d1f611eb84042477551c330d48e807c400bfe2819faa583edb794f0a4828a7b9d8a3b80c8a8cfa1fbe574fe2e66fec0e54c97822170e51c831e0c66fac2
7
+ data.tar.gz: bd5568a681060915dbc5de1092668f37a4cc41e5974e710d1da66b2f5fb0017048285a8084cb306ae5355a6f9e0f82bc258d7335234a4fe79f87759df53f0f72
@@ -32,7 +32,7 @@ module FastlaneCraft
32
32
  @plist_controller.bump_build_version_patch
33
33
  push_version_bump
34
34
 
35
- remove_last_git_tag_if_needed
35
+ remove_existing_git_tag
36
36
  push_git_tag
37
37
  end
38
38
 
@@ -74,37 +74,38 @@ module FastlaneCraft
74
74
  end
75
75
 
76
76
  def push_git_tag
77
- cmd = "git tag #{git_tag} && git push --tags"
77
+ UI.message "going to push tag: #{curr_git_tag}"
78
+ cmd = "git tag #{curr_git_tag} && git push --tags"
78
79
  raise "Tag push failed! Command execution error: '#{cmd}'" unless system(cmd)
79
80
  end
80
81
 
81
- def remove_last_git_tag
82
- tag = last_git_tag
82
+ def remove_existing_git_tag
83
+ tag = existing_git_tag
84
+ return if tag.nil?
85
+
86
+ UI.message "going to remove tag: #{tag}"
83
87
  cmd = "git tag -d #{tag} && git push origin :refs/tags/#{tag}"
84
88
  raise "Git tag deletion failed! Command execution error: '#{cmd}'" unless system(cmd)
85
89
  end
86
90
 
87
- def remove_last_git_tag_if_needed
88
- remove_last_git_tag if last_git_tag_version == @version
89
- end
90
-
91
- def git_tag
91
+ def curr_git_tag
92
92
  return @version.to_s unless @target_suffix
93
93
  "#{@version}_#{@target_suffix}"
94
94
  end
95
95
 
96
- def last_git_tag_version
97
- return nil unless last_git_tag.nil?
98
- tag = last_git_tag.match(/[0-9.]+/)[0]
99
- version_valid?(tag) ? Version.new(tag) : nil
96
+ def existing_git_tag
97
+ git_tags.detect do |t|
98
+ tag_v = t.match(/[0-9.]+/)[0]
99
+ version_valid?(tag_v) && Version.new(tag_v) == @version
100
+ end
100
101
  end
101
102
 
102
- def last_git_tag
103
- `git tag`&.split("\n")&.first
103
+ def git_tags
104
+ `git tag`.split("\n")
104
105
  end
105
106
 
106
- def version_valid?(v)
107
- v.to_s.match?(/^\d\.\d\.\d{1,3}$/)
107
+ def version_valid?(version)
108
+ version.to_s.match?(/^\d\.\d\.\d{1,3}$/)
108
109
  end
109
110
 
110
111
  def version_dump
@@ -17,15 +17,15 @@ module FastlaneCraft
17
17
  set_build_version(Version.new(value))
18
18
  end
19
19
 
20
- def set_version(v)
20
+ def set_version(version)
21
21
  info_plists.each do |path|
22
- set_plist_value_for(path, v.to_s, version_key)
22
+ set_plist_value_for(path, version.to_s, version_key)
23
23
  end
24
24
  end
25
25
 
26
- def set_build_version(v)
26
+ def set_build_version(version)
27
27
  info_plists.each do |path|
28
- set_plist_value_for(path, v.to_s, build_version_key)
28
+ set_plist_value_for(path, version.to_s, build_version_key)
29
29
  end
30
30
  end
31
31
 
@@ -1,3 +1,3 @@
1
1
  module FastlaneCraft
2
- VERSION = '1.3.4'.freeze
2
+ VERSION = '1.3.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-craft
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 1.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - sroik
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-03-12 00:00:00.000000000 Z
12
+ date: 2018-03-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fastlane