fastlane-plugin-stream_actions 0.1.15 → 0.1.16
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: b4f4cb310ffff11e9c81c8b5838906e12e70375acf736733c36750ac69fbf873
|
4
|
+
data.tar.gz: 5f79a9699b893bc7000215f5fc3b705fa7f7cf1836b6f35677e73f4ee71b6803
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
-
|
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
|
-
|
18
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
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.
|
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-
|
11
|
+
date: 2022-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|