fastlane-plugin-logme 0.1.5 → 0.1.6

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: 8ce9e540f791a36fa27c1eac7d4c3204c26ed55b
4
- data.tar.gz: f8d5677e3c1e08c1e8888f8cf4521ceca15499e2
3
+ metadata.gz: 1bccafd656f0e8cbec05d5a9980c02aa975ce8e6
4
+ data.tar.gz: 2c051a74a09ddfc40b9173c977dfe435e582a1b2
5
5
  SHA512:
6
- metadata.gz: fec613fc1864b5d21ad2c31cd957bc8a6b56a927311a870d57a10e0986190af03e529a6d799f054b1e33fb5f606f7ad64a2dfb88be3ebb53ff8b0dad245314d9
7
- data.tar.gz: b4003a669b780b6c53bd678c30d2c8f4d9fb556a83611457c00fdbc02e8445eee68f53abf3cbaa6e0e06d18b8e5615a808213df75a1ee6220896b4adbadcec47
6
+ metadata.gz: 705c51fef606c301df6456a83c82ec9a48f9d074dc79162d0d190896ebf169eb5e2ada45b617dec9802adbd7cd737f00cc08bb2c7482df86e23b13c2a7b6a85c
7
+ data.tar.gz: 3e9af8625b9aa3f05ead353c89d3dde77e4b1bdab3f3d0a3655b64f7532d59d03df9b9b9159c8476c98d3811da50d045afbb397a92543e919969da42337f6ed8
data/README.md CHANGED
@@ -19,11 +19,12 @@ Has we use a Continues Delivery, we need a way to create release notes automatic
19
19
  ## How to use it?
20
20
  Just invoke *logme* in your Fastfile action. Logme will return the commit messages
21
21
 
22
- | Option | Description | Optional |
23
- |---|---|---|
24
- | `to_revision` | End revision commit | false |
25
- | `from_revision` | From revision commit | false |
26
- | `message_regexp_filters` | Regexp filters like. ie '^MDM-\|^CTS:' | true |
22
+ | Option | Description | Optional | Default |
23
+ |---|---|---|---|
24
+ | `to_revision` | End revision commit | false | |
25
+ | `from_revision` | From revision commit | false | |
26
+ | `message_regexp_filters` | Regexp filters like. ie '^MDM-\|^CTS:' | true | `.` |
27
+ | `remove_commits_already_merged` | Remove commit messages already merged | true | `false` |
27
28
 
28
29
  ## Example
29
30
  Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
@@ -4,9 +4,20 @@ module Fastlane
4
4
 
5
5
  def self.run(options)
6
6
  regexp_filter = Regexp.new(options[:message_regexp_filters])
7
- Actions.sh("git log --pretty=format:\"%s\" --no-merges --ancestry-path #{options[:from_revision]}...#{options[:to_revision]}")
8
- .split(/\n/)
9
- .select{|message| message[regexp_filter] != nil}
7
+ changes = Actions.sh("git log --pretty=\"%s\" --no-merges #{options[:from_revision]}...#{options[:to_revision]}")
8
+ .split(/\n/)
9
+
10
+ if options[:remove_commits_already_merged]
11
+ merges = Actions.sh("git log --pretty=\"%b\" --merges #{options[:from_revision]}...#{options[:to_revision]}")
12
+ .split("* commit")
13
+
14
+ merges.delete_at(0) # empty value
15
+ merges.delete_at(0) # last merge
16
+ merges = merges.join("\n")
17
+ changes.delete_if{|commit| merges.include?(commit) }
18
+ end
19
+
20
+ changes.select{|message| message[regexp_filter] != nil}
10
21
  .join("\n\r")
11
22
  end
12
23
 
@@ -29,6 +40,11 @@ module Fastlane
29
40
  FastlaneCore::ConfigItem.new(key: :message_regexp_filters,
30
41
  description: "Regexp filters like. ie '^MDM-|^CTS:'",
31
42
  default_value: '.',
43
+ optional: true),
44
+ FastlaneCore::ConfigItem.new(key: :remove_commits_already_merged,
45
+ description: 'Remove commit messages already merged',
46
+ default_value: false,
47
+ is_string: false,
32
48
  optional: true)
33
49
  ]
34
50
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Logme
3
- VERSION = "0.1.5"
3
+ VERSION = "0.1.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-logme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luís Esteves
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-14 00:00:00.000000000 Z
11
+ date: 2017-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry