fastlane-plugin-changelog 0.2.0 → 0.3.0
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f20a927e35629cebe67c2446b4fb3b30e53a9616
|
4
|
+
data.tar.gz: 14107c6871ac6ec8bb38e13bbc99ab51bd35774b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1aeea9be1799a28adafdb52255be92e42ed1b3804e28d4a11ad55cefaa45b5e7b8c5f4d701db4e1ab1ed37540c817c69080e74effc6adc65c6c9a63df1bf078
|
7
|
+
data.tar.gz: b4f404efec6a72a822b3306d72a61b5dc06fde25ae507b3a77526b527e142ebb3be2a9d000f7b340da2cf31708f6ccc456685b49fb060d13d38c52fd6b9737fa
|
data/README.md
CHANGED
@@ -53,7 +53,7 @@ update_changelog(
|
|
53
53
|
```
|
54
54
|
|
55
55
|
### stamp_changelog
|
56
|
-
Stamps the _Unreleased_ (see [How can I minimize the effort required?](http://keepachangelog.com/)) section with provided identifier in your project `CHANGELOG.md` file.
|
56
|
+
Stamps the _Unreleased_ (see [How can I minimize the effort required?](http://keepachangelog.com/)) section with provided identifier in your project `CHANGELOG.md` file and sets up a new _Unreleased_ section above it.
|
57
57
|
Additionally, you can provide git tag associated with this section. `stamp_changelog` will then create a link to diff between this and previous section's tag on Github. This will enable you to quickly get to [comparison between two tags](https://help.github.com/articles/comparing-commits-across-time/).
|
58
58
|
``` ruby
|
59
59
|
stamp_changelog(
|
@@ -9,7 +9,8 @@ module Fastlane
|
|
9
9
|
section_identifier = params[:section_identifier] unless params[:section_identifier].to_s.empty?
|
10
10
|
Actions::UpdateChangelogAction.run(changelog_path: changelog_path,
|
11
11
|
section_identifier: "[Unreleased]",
|
12
|
-
updated_section_identifier: section_identifier
|
12
|
+
updated_section_identifier: section_identifier,
|
13
|
+
append_date: params[:stamp_date])
|
13
14
|
|
14
15
|
file_content = ""
|
15
16
|
|
@@ -36,7 +37,7 @@ module Fastlane
|
|
36
37
|
end
|
37
38
|
|
38
39
|
# 3. Create link to Github tags diff
|
39
|
-
|
40
|
+
if params[:git_tag] && !params[:git_tag].empty?
|
40
41
|
last_line = file_content.lines.last
|
41
42
|
previous_section_name = last_line[/\[(.*?)\]/, 1]
|
42
43
|
previous_previous_tag = %r{(?<=compare\/)(.*)?(?=\.{3})}.match(last_line)
|
@@ -83,6 +84,11 @@ module Fastlane
|
|
83
84
|
env_name: "FL_STAMP_CHANGELOG_SECTION_IDENTIFIER",
|
84
85
|
description: "The unique section identifier to stamp the [Unreleased] section with",
|
85
86
|
is_string: true),
|
87
|
+
FastlaneCore::ConfigItem.new(key: :stamp_date,
|
88
|
+
env_name: "FL_STAMP_CHANGELOG_SECTION_STAMP_DATE",
|
89
|
+
description: "Specifies whether the current date should be appended to section identifier",
|
90
|
+
default_value: true,
|
91
|
+
optional: true),
|
86
92
|
FastlaneCore::ConfigItem.new(key: :git_tag,
|
87
93
|
env_name: "FL_STAMP_CHANGELOG_GIT_TAG",
|
88
94
|
description: "The git tag associated with this section",
|
@@ -28,6 +28,14 @@ module Fastlane
|
|
28
28
|
|
29
29
|
line_old = line.dup
|
30
30
|
line.sub!(section_name, new_section_identifier)
|
31
|
+
|
32
|
+
if params[:append_date]
|
33
|
+
now = Time.now.strftime("%Y-%m-%d")
|
34
|
+
line.concat(" - " + now)
|
35
|
+
line.delete!("\n") # remove line break, because concatenation adds line break between section identifer & date
|
36
|
+
line.concat("\n") # add line break to the end of the string, in order to start next line on the next line
|
37
|
+
end
|
38
|
+
|
31
39
|
found_identifying_section = false
|
32
40
|
|
33
41
|
UI.message "Old section identifier: #{line_old.delete!("\n")}"
|
@@ -86,6 +94,11 @@ module Fastlane
|
|
86
94
|
env_name: "FL_UPDATE_CHANGELOG_UPDATED_SECTION_IDENTIFIER",
|
87
95
|
description: "The updated unique section identifier",
|
88
96
|
is_string: true,
|
97
|
+
optional: true),
|
98
|
+
FastlaneCore::ConfigItem.new(key: :append_date,
|
99
|
+
env_name: "FL_UPDATE_CHANGELOG_APPEND_DATE",
|
100
|
+
description: "Appends the current date in YYYY-MM-DD format after the section identifier",
|
101
|
+
default_value: true,
|
89
102
|
optional: true)
|
90
103
|
# FastlaneCore::ConfigItem.new(key: :updated_section_content,
|
91
104
|
# env_name: "FL_UPDATE_CHANGELOG_UPDATED_SECTION_CONTENT",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-changelog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Prochazka
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -133,4 +133,3 @@ signing_key:
|
|
133
133
|
specification_version: 4
|
134
134
|
summary: Automate changes to your project CHANGELOG.md
|
135
135
|
test_files: []
|
136
|
-
has_rdoc:
|