Skip to content

Commit

Permalink
Merge pull request #25 from thislooksfun/feature/clean-up-output
Browse files Browse the repository at this point in the history
fix: clean up analyze_commits printout
  • Loading branch information
xotahal authored Jun 28, 2020
2 parents e17b24c + 2cfd834 commit 15e2bbc
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions lib/fastlane/plugin/semantic_release/actions/analyze_commits.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,13 @@ def self.is_releasable(params)
releases = params[:releases]

splitted.each do |line|
parts = line.split("|")
subject = parts[0].strip
# conventional commits are in format
# type: subject (fix: app crash - for example)
commit = Helper::SemanticReleaseHelper.parse_commit(
commit_subject: line.split("|")[0],
commit_body: line.split("|")[1],
commit_subject: subject,
commit_body: parts[1],
releases: releases
)

Expand All @@ -118,7 +120,7 @@ def self.is_releasable(params)
end

next_version = "#{next_major}.#{next_minor}.#{next_patch}"
UI.message("#{next_version}: #{line}")
UI.message("#{next_version}: #{subject}") if params[:show_version_path]
end

next_version = "#{next_major}.#{next_minor}.#{next_patch}"
Expand Down Expand Up @@ -252,6 +254,13 @@ def self.available_options
type: Array,
optional: true
),
FastlaneCore::ConfigItem.new(
key: :show_version_path,
description: "True if you want to print out the version calculated for each commit",
default_value: true,
type: Boolean,
optional: true
),
FastlaneCore::ConfigItem.new(
key: :debug,
description: "True if you want to log out a debug info",
Expand Down

0 comments on commit 15e2bbc

Please sign in to comment.