fastlane-plugin-stream_actions 0.3.25 → 0.3.27
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5732f6ddcd708b4fc4125f4ad3ec0f4129cb70eba9ad42058ef4aa165f0abe09
|
4
|
+
data.tar.gz: fc8765dc316b0c1137a1a6d9b4e20bbf40953a09e66222f7f9fb06a123dbf93f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fe9f86b1516a7f0e1a9973b3bf79bdf5835268345afcedc60a6162a0db2f1d5a7fd6f2959bc41deb3b55ddc566bd13e808dc2dd38cc77558b4f7fdd6900a3e4
|
7
|
+
data.tar.gz: 2138dae0cf70476a0f5c17ba8bfbec0dab9eff130d7b8d60b54ec07030f8bd90a6a8726801c4311513e564dc5b9384173d6d50d42c55d64e5283ff4168c6b019
|
@@ -0,0 +1,55 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class UpdateCopyrightAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
new_year = Time.now.year.to_s
|
6
|
+
|
7
|
+
ext = '*.{swift,h,strings,pbxproj}'
|
8
|
+
source_files = Dir.glob(File.join(params[:path], '**', ext)).reject do |f|
|
9
|
+
params[:ignore].any? { |dir| f.include?(dir) }
|
10
|
+
end
|
11
|
+
|
12
|
+
source_files.each do |file_path|
|
13
|
+
UI.message("👀 Searching for copyright header in #{File.basename(file_path)}")
|
14
|
+
old_content = File.read(file_path)
|
15
|
+
match = old_content.match(/Copyright © (\d{4}) Stream.io/)
|
16
|
+
next if !match || match[1] == new_year
|
17
|
+
|
18
|
+
old_year = match[1]
|
19
|
+
new_content = old_content.gsub("Copyright © #{old_year}", "Copyright © #{new_year}")
|
20
|
+
|
21
|
+
File.write(file_path, new_content)
|
22
|
+
UI.success("✅ Updated copyright header in #{File.basename(file_path)}")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
#####################################################
|
27
|
+
# @!group Documentation
|
28
|
+
#####################################################
|
29
|
+
|
30
|
+
def self.description
|
31
|
+
'Updates copyright headers in source files'
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.available_options
|
35
|
+
[
|
36
|
+
FastlaneCore::ConfigItem.new(
|
37
|
+
key: :path,
|
38
|
+
description: 'A path to search for files to update',
|
39
|
+
default_value: '.'
|
40
|
+
),
|
41
|
+
FastlaneCore::ConfigItem.new(
|
42
|
+
key: :ignore,
|
43
|
+
description: 'The folders to ignore',
|
44
|
+
is_string: false,
|
45
|
+
default_value: []
|
46
|
+
)
|
47
|
+
]
|
48
|
+
end
|
49
|
+
|
50
|
+
def self.supported?(_platform)
|
51
|
+
[:ios].include?(platform)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-stream_actions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GetStream
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xctest_list
|
@@ -243,6 +243,7 @@ files:
|
|
243
243
|
- lib/fastlane/plugin/stream_actions/actions/retrieve_xctest_names.rb
|
244
244
|
- lib/fastlane/plugin/stream_actions/actions/testflight_build.rb
|
245
245
|
- lib/fastlane/plugin/stream_actions/actions/touch_changelog.rb
|
246
|
+
- lib/fastlane/plugin/stream_actions/actions/update_copyright.rb
|
246
247
|
- lib/fastlane/plugin/stream_actions/actions/update_testplan.rb
|
247
248
|
- lib/fastlane/plugin/stream_actions/actions/wait_android_emu_idle.rb
|
248
249
|
- lib/fastlane/plugin/stream_actions/version.rb
|