fastlane-plugin-stream_actions 0.3.25 → 0.3.26
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: 6aba0bbc5fa5e37b28b8d35a5175de081e2dfa0dd441809761cc9b168f8aa360
|
4
|
+
data.tar.gz: cd39f7ed89118ef8b6445765fbfba67190844ae5615c3406b849f9e4cfc5c146
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 617fbff6d8aca502544bab0c61c4adbd9e62947baacd7e7539c380fd5e824ae93a39447f4c70b950a1f3865eedc81c75eb25e787d92f2ca5fdd3ecc47ed0d1d7
|
7
|
+
data.tar.gz: fb3b8f7ebf97ef68b01be8968e4ce71e9909fa104e456d9f50076d3347191cd96b60be6f0c39400f8d72e2d60964a3a2c88ae8c5d4664490a88998f72b005a12
|
@@ -0,0 +1,54 @@
|
|
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
|
+
old_content = File.read(file_path)
|
14
|
+
match = old_content.match(/Copyright © (\d{4}) Stream.io/)
|
15
|
+
next if !match || match[1] == new_year
|
16
|
+
|
17
|
+
old_year = match[1]
|
18
|
+
new_content = old_content.gsub("Copyright © #{old_year}", "Copyright © #{new_year}")
|
19
|
+
|
20
|
+
File.write(file_path, new_content)
|
21
|
+
UI.success("Updated copyright year in #{File.basename(file_path)}")
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
#####################################################
|
26
|
+
# @!group Documentation
|
27
|
+
#####################################################
|
28
|
+
|
29
|
+
def self.description
|
30
|
+
'Updates copyright headers in source files'
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.available_options
|
34
|
+
[
|
35
|
+
FastlaneCore::ConfigItem.new(
|
36
|
+
key: :path,
|
37
|
+
description: 'A path to search for files to update',
|
38
|
+
default_value: '.'
|
39
|
+
),
|
40
|
+
FastlaneCore::ConfigItem.new(
|
41
|
+
key: :ignore,
|
42
|
+
description: 'The folders to ignore',
|
43
|
+
is_string: false,
|
44
|
+
default_value: []
|
45
|
+
)
|
46
|
+
]
|
47
|
+
end
|
48
|
+
|
49
|
+
def self.supported?(_platform)
|
50
|
+
[:ios].include?(platform)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
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.26
|
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
|