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: 7702dc07ddb3f7b78dc10fed7dba29680c9f15a28de5f94b86d7e2151fc23d30
4
- data.tar.gz: 11b125f4c7ae0dab9edb52b03563dc8e4c3e0af189fb50d21f1c233f7f189e62
3
+ metadata.gz: 6aba0bbc5fa5e37b28b8d35a5175de081e2dfa0dd441809761cc9b168f8aa360
4
+ data.tar.gz: cd39f7ed89118ef8b6445765fbfba67190844ae5615c3406b849f9e4cfc5c146
5
5
  SHA512:
6
- metadata.gz: e3046452f84577503f6695970de2af69ce29b5740df04eee05c153da492dc7e1f78690bec36552b6cace891ee7019b0a19088964a1cda408684e0ef4060a34d6
7
- data.tar.gz: 82b67d5de7c5af5e65413fb8fe0a5345564a64d72a0ef832aa9c0f9edb69088a33cef5143777f3062e8926fa01ef8ba3f833ea8ccb12b7ae3697e487a85e9dbe
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
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module StreamActions
3
- VERSION = '0.3.25'
3
+ VERSION = '0.3.26'
4
4
  end
5
5
  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.25
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: 2023-10-26 00:00:00.000000000 Z
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