fastlane-plugin-stream_actions 0.1.15 → 0.1.16

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: af1d94514c2d3fc5e6de1be36819a669dd210316016d6f1724722ef337e72603
4
- data.tar.gz: 1dd2ee983d552514d090a4f09900300fe8a5df4bac091123b7b4d097a9954d2b
3
+ metadata.gz: b4f4cb310ffff11e9c81c8b5838906e12e70375acf736733c36750ac69fbf873
4
+ data.tar.gz: 5f79a9699b893bc7000215f5fc3b705fa7f7cf1836b6f35677e73f4ee71b6803
5
5
  SHA512:
6
- metadata.gz: 347bd253d9443b5bb14683ac93fc4408ddf6e34bd43060db1699e18d2d5ceaf8eadb1eb6addfa970e69713c0302926c614b30315f3b0b3492b590a96803655ac
7
- data.tar.gz: 8e2e9b4ef242c8f3eff526fd212dac0f6fc99ae0231a6659bc526dddfed7130f54d7b89494a5eba6b3449635dd181aa7ef3417f8a8b2287d0c463f8092674e4f
6
+ metadata.gz: c93a99d94c8163f649b4603a51176f026e35ab360c1d5ba17298a7c2d6e7cf54605a5709e5d7db15dc429d3823623f6d0527dab809c9ea52105347e96c798ad1
7
+ data.tar.gz: ed5168b819dec5dec92d76cd5d63b0d486e7b7671fb651f7e497ec691be6a28756767b6790729644c656fbc615a4beeb8077b8fe1aeeb1d75914702bcd36a873
@@ -2,42 +2,38 @@ module Fastlane
2
2
  module Actions
3
3
  class TouchChangelogAction < Action
4
4
  def self.run(params)
5
- changelog_path = params[:changelog_path] unless params[:changelog_path].to_s.empty?
6
- release_version = params[:release_version] unless params[:release_version].to_s.empty?
5
+ UI.message("Starting to update '#{params[:changelog_path]}'")
7
6
 
8
- UI.message("Starting to update '#{changelog_path}'")
9
-
10
- file_data = File.readlines(changelog_path)
7
+ file_data = File.readlines(params[:changelog_path])
11
8
  upcoming_line = -1
12
9
  changes_since_last_release = ''
13
10
 
14
- File.open(changelog_path).each.with_index do |line, index|
11
+ File.open(params[:changelog_path]).each.with_index do |line, index|
15
12
  if upcoming_line != -1
16
- if line.start_with?('# [')
17
- break
18
- else
19
- changes_since_last_release += line
20
- end
13
+ break if line.start_with?('# [')
14
+
15
+ changes_since_last_release += line
21
16
  elsif line == "# Upcoming\n"
22
17
  upcoming_line = index
23
18
  end
24
19
  end
25
20
 
26
- file_data[upcoming_line] = "# [#{release_version}](https://github.com/#{params[:github_repo]}/releases/tag/#{release_version})"
21
+ file_data[upcoming_line] = "# [#{params[:release_version]}](https://github.com/#{params[:github_repo]}/releases/tag/#{params[:release_version]})"
27
22
 
28
23
  today = Time.now.strftime('%B %d, %Y')
24
+
29
25
  file_data.insert(upcoming_line + 1, "_#{today}_")
30
26
  file_data.insert(upcoming_line, '# Upcoming')
31
27
  file_data.insert(upcoming_line + 1, '')
32
28
  file_data.insert(upcoming_line + 2, '### 🔄 Changed')
33
29
  file_data.insert(upcoming_line + 3, '')
34
30
 
35
- # Write updated content to file
36
- changelog = File.open(changelog_path, 'w')
31
+ changelog = File.open(params[:changelog_path], 'w')
37
32
  changelog.puts(file_data)
38
33
  changelog.close
39
- UI.success("Successfully updated #{changelog_path}")
40
- return changes_since_last_release
34
+ UI.success("Successfully updated #{params[:changelog_path]}")
35
+
36
+ changes_since_last_release
41
37
  end
42
38
 
43
39
  #####################################################
@@ -57,24 +53,16 @@ module Fastlane
57
53
  FastlaneCore::ConfigItem.new(
58
54
  key: :github_repo,
59
55
  env_name: 'GITHUB_REPOSITORY',
60
- description: 'The owner and repository name. For example, octocat/Hello-World',
61
- is_string: true
56
+ description: 'The owner and repository name. For example, octocat/Hello-World'
62
57
  ),
63
58
  FastlaneCore::ConfigItem.new(
64
59
  key: :changelog_path,
65
- env_name: 'FL_CHANGELOG_PATH',
66
60
  description: 'The path to your project CHANGELOG.md',
67
- is_string: true,
68
- default_value: './CHANGELOG.md',
69
- optional: true
61
+ default_value: './CHANGELOG.md'
70
62
  ),
71
63
  FastlaneCore::ConfigItem.new(
72
64
  key: :release_version,
73
- env_name: 'FL_CHANGELOG_RELEASE_VERSION',
74
- description: 'The release version, according to semantic versioning',
75
- is_string: true,
76
- default_value: '',
77
- optional: false
65
+ description: 'The release version, according to semantic versioning'
78
66
  )
79
67
  ]
80
68
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module StreamActions
3
- VERSION = "0.1.15"
3
+ VERSION = "0.1.16"
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.1.15
4
+ version: 0.1.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - GetStream
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-04 00:00:00.000000000 Z
11
+ date: 2022-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler