captive-release 0.3.0 → 0.3.2
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d8a8f6ab2f463b240b4c63c11f6c1cc1e6be7a0227e2b9267d45ed356362091f
|
|
4
|
+
data.tar.gz: f0e56d4dee64cc94f1d43af5a7f6157a631f80fb671244147515c646e78e6649
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b1236c89421a8a02145031c143dd76d0dc2e95544e96d0d06414c8010ddc8cdbd58630348291e6255fc705c63e9c8a95f403e6ca76c091f74b2d8ed0acd5daad
|
|
7
|
+
data.tar.gz: 831c10981c564aa3867c7de887726479dd4a8686899afe550c1db3d55f086f619af34ba02d64fc5631b5a226511409f504205c4398f33d5db70592c95aaa21cd
|
data/lib/captive_release/cli.rb
CHANGED
|
@@ -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"
|
|
@@ -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
|
-
|
|
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
|