captive-release 0.3.0 → 0.3.1

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: 62ba2157fbf2d4c10b034accf3e73b2de0d69018462070b8e2103db59b23ad5f
4
- data.tar.gz: 9851621f86185f00f08194435d3c813bcd7db0782fe3f8475449284dad8b166c
3
+ metadata.gz: 7aa74f315929e27418886baf09a7fb4b8ed0206df3727fea04789b57a024742a
4
+ data.tar.gz: 57c519a3616a1d2d7461acd19232a3bc43c4713e17209c787a6ea4ce06292b1d
5
5
  SHA512:
6
- metadata.gz: 6290d340d5d2ae97b3f110ba8e03b27f295da458608110f6f5db710766856ccd691efb47d2a4f4505987a4a69035981618c2b21986d205a26ee56d1817b1a3ba
7
- data.tar.gz: c5f6a79bd4ee364c862475939696187ef8dcc7e38ce908c053a8d7634a15381cb827b50d02b7864fb2512f952ca124354fbbeae25bee5f320df176fd36f575b3
6
+ metadata.gz: 1de77cbf32d6fa87f389849d5f4ba94a59bce14f1d88cff6d138c3d2fb8c384e9278bc8413ada8a7dee282c5ad5578393a77fd3e4589af094e6f027711a8c1f0
7
+ data.tar.gz: b6d2179c8cddb68a81497d171ee68d6bce790dcb532de5cb9fcdf3ef13605e7d10b3ef6d3abf60fa41f22fe5b23e2164a7df34a45cb16cb9da776378a04efcbc
@@ -95,7 +95,7 @@ module CaptiveRelease
95
95
  puts " #{ok("✅")} VERSION créé avec #{bold(initial)}"
96
96
 
97
97
  file = VersionFile.new("VERSION", "plain")
98
- write_config([file])
98
+ write_config([ file ])
99
99
  end
100
100
 
101
101
  def run_init_non_interactive(files_arg)
@@ -230,7 +230,7 @@ module CaptiveRelease
230
230
  "Patch" => VersionBumper.bump(current, "patch"),
231
231
  "Minor" => VersionBumper.bump(current, "minor"),
232
232
  "Major" => VersionBumper.bump(current, "major"),
233
- "Custom" => nil
233
+ "Custom" => nil,
234
234
  }
235
235
 
236
236
  puts "Choose release type:\n"
@@ -36,7 +36,7 @@ module CaptiveRelease
36
36
  match = url.match(%r{github\.com[:/]([^/]+)/(.+?)(?:\.git)?\z})
37
37
  raise "Cannot parse GitHub repo from remote URL: #{url}" unless match
38
38
 
39
- [match[1], match[2]]
39
+ [ match[1], match[2] ]
40
40
  end
41
41
  end
42
42
  end
@@ -30,7 +30,7 @@ module CaptiveRelease
30
30
  "name" => "v#{@version}",
31
31
  "body" => @body.empty? ? "_No commits since last release._" : @body,
32
32
  "draft" => false,
33
- "prerelease" => false
33
+ "prerelease" => false,
34
34
  })
35
35
 
36
36
  response = github_post(uri, @token, payload)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CaptiveRelease
4
- VERSION = "0.3.0"
4
+ VERSION = "0.3.1"
5
5
  end
@@ -44,13 +44,13 @@ module CaptiveRelease
44
44
  path = @root.join("android", "app", "build.gradle")
45
45
  return [] unless File.exist?(path) && File.read(path).match?(/versionName\s+['"]/)
46
46
 
47
- [VersionFile.new("android/app/build.gradle", "android_gradle")]
47
+ [ VersionFile.new("android/app/build.gradle", "android_gradle") ]
48
48
  rescue
49
49
  []
50
50
  end
51
51
 
52
52
  def find_ios_plist_files
53
- Dir.glob(@root.join("ios", "**", "Info.plist")).sort.reject { |p| excluded?(p) }.select do |path|
53
+ Dir.glob(@root.join("ios", "**", "Info.plist").to_s).sort.reject { |p| excluded?(p) }.select do |path|
54
54
  File.read(path).include?("CFBundleShortVersionString")
55
55
  end.map do |path|
56
56
  relative = Pathname.new(path).relative_path_from(@root).to_s
@@ -61,7 +61,7 @@ module CaptiveRelease
61
61
  end
62
62
 
63
63
  def find_ruby_version_files
64
- Dir.glob(@root.join("lib", "**", "version.rb")).sort.reject { |p| excluded?(p) }.select do |path|
64
+ Dir.glob(@root.join("lib", "**", "version.rb").to_s).sort.reject { |p| excluded?(p) }.select do |path|
65
65
  File.read(path).match?(/VERSION\s*=\s*["'].+?["']/)
66
66
  end.map do |path|
67
67
  relative = Pathname.new(path).relative_path_from(@root).to_s
@@ -70,14 +70,15 @@ module CaptiveRelease
70
70
  end
71
71
 
72
72
  def find_files(filename, type)
73
- Dir.glob(@root.join("**", filename)).sort.reject { |p| excluded?(p) }.map do |path|
73
+ Dir.glob(@root.join("**", filename).to_s).sort.reject { |p| excluded?(p) }.map do |path|
74
74
  relative = Pathname.new(path).relative_path_from(@root).to_s
75
75
  VersionFile.new(relative, type)
76
76
  end
77
77
  end
78
78
 
79
79
  def excluded?(path)
80
- EXCLUDED_DIRS.any? { |dir| path.include?("/#{dir}/") || path.include?("/#{dir}\\") }
80
+ relative = Pathname.new(path).relative_path_from(@root).to_s
81
+ EXCLUDED_DIRS.any? { |dir| relative.start_with?("#{dir}/") || relative.include?("/#{dir}/") }
81
82
  end
82
83
  end
83
84
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: captive-release
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Captive Studio