fastlane-plugin-semantic_release 1.8.0 → 1.9.0
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 +4 -4
- data/lib/fastlane/plugin/semantic_release/actions/analyze_commits.rb +32 -9
- data/lib/fastlane/plugin/semantic_release/actions/conventional_changelog.rb +16 -2
- data/lib/fastlane/plugin/semantic_release/helper/semantic_release_helper.rb +3 -3
- data/lib/fastlane/plugin/semantic_release/version.rb +1 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: d31080ed0e60026d8e691194ddb620b276fa4138a2347af0da76c6da03660985
         | 
| 4 | 
            +
              data.tar.gz: 3114545c304b7636d58ac3b16ddc315de4ae283980039b76eeb9342dd6dab799
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: eb2c1ce206ff206e108f31d19490bc7855991bb69ed514209750bb5d664b9784f86123e9309a690608f35d5b2a215e651b767782a4887e2ba541acbf31a792d1
         | 
| 7 | 
            +
              data.tar.gz: c11abd5f99fd43483c149eb594fa76ca6bab6970510396e17fa0af08a698c7f5577a1d82893c201c7d4679278cb6ccde74d8685bd63f0327d19c67ef578d7cfb
         | 
| @@ -19,7 +19,7 @@ module Fastlane | |
| 19 19 | 
             
                  def self.get_last_tag(params)
         | 
| 20 20 | 
             
                    # Try to find the tag
         | 
| 21 21 | 
             
                    command = "git describe --tags --match=#{params[:match]}"
         | 
| 22 | 
            -
                    Actions.sh(command, log:  | 
| 22 | 
            +
                    Actions.sh(command, log: params[:debug])
         | 
| 23 23 | 
             
                  rescue
         | 
| 24 24 | 
             
                    UI.message("Tag was not found for match pattern - #{params[:match]}")
         | 
| 25 25 | 
             
                    ''
         | 
| @@ -27,11 +27,15 @@ module Fastlane | |
| 27 27 |  | 
| 28 28 | 
             
                  def self.get_last_tag_hash(params)
         | 
| 29 29 | 
             
                    command = "git rev-list -n 1 refs/tags/#{params[:tag_name]}"
         | 
| 30 | 
            -
                    Actions.sh(command, log:  | 
| 30 | 
            +
                    Actions.sh(command, log: params[:debug]).chomp
         | 
| 31 31 | 
             
                  end
         | 
| 32 32 |  | 
| 33 33 | 
             
                  def self.get_commits_from_hash(params)
         | 
| 34 | 
            -
                    commits = Helper::SemanticReleaseHelper.git_log( | 
| 34 | 
            +
                    commits = Helper::SemanticReleaseHelper.git_log(
         | 
| 35 | 
            +
                      pretty: '%s|%b|>',
         | 
| 36 | 
            +
                      start: params[:hash],
         | 
| 37 | 
            +
                      debug: params[:debug]
         | 
| 38 | 
            +
                    )
         | 
| 35 39 | 
             
                    commits.split("|>")
         | 
| 36 40 | 
             
                  end
         | 
| 37 41 |  | 
| @@ -42,12 +46,15 @@ module Fastlane | |
| 42 46 | 
             
                    # Default last version
         | 
| 43 47 | 
             
                    version = '0.0.0'
         | 
| 44 48 |  | 
| 45 | 
            -
                    tag = get_last_tag( | 
| 49 | 
            +
                    tag = get_last_tag(
         | 
| 50 | 
            +
                      match: params[:match],
         | 
| 51 | 
            +
                      debug: params[:debug]
         | 
| 52 | 
            +
                    )
         | 
| 46 53 |  | 
| 47 54 | 
             
                    if tag.empty?
         | 
| 48 55 | 
             
                      UI.message("First commit of the branch is taken as a begining of next release")
         | 
| 49 56 | 
             
                      # If there is no tag found we taking the first commit of current branch
         | 
| 50 | 
            -
                      hash = Actions.sh('git rev-list --max-parents=0 HEAD', log:  | 
| 57 | 
            +
                      hash = Actions.sh('git rev-list --max-parents=0 HEAD', log: params[:debug]).chomp
         | 
| 51 58 | 
             
                    else
         | 
| 52 59 | 
             
                      # Tag's format is v2.3.4-5-g7685948
         | 
| 53 60 | 
             
                      # See git describe man page for more info
         | 
| @@ -60,7 +67,10 @@ module Fastlane | |
| 60 67 |  | 
| 61 68 | 
             
                      version = parsed_version[0]
         | 
| 62 69 | 
             
                      # Get a hash of last version tag
         | 
| 63 | 
            -
                      hash = get_last_tag_hash( | 
| 70 | 
            +
                      hash = get_last_tag_hash(
         | 
| 71 | 
            +
                        tag_name: tag_name,
         | 
| 72 | 
            +
                        debug: params[:debug]
         | 
| 73 | 
            +
                      )
         | 
| 64 74 |  | 
| 65 75 | 
             
                      UI.message("Found a tag #{tag_name} associated with version #{version}")
         | 
| 66 76 | 
             
                    end
         | 
| @@ -71,7 +81,10 @@ module Fastlane | |
| 71 81 | 
             
                    next_patch = (version.split('.')[2] || 0).to_i
         | 
| 72 82 |  | 
| 73 83 | 
             
                    # Get commits log between last version and head
         | 
| 74 | 
            -
                    splitted = get_commits_from_hash( | 
| 84 | 
            +
                    splitted = get_commits_from_hash(
         | 
| 85 | 
            +
                      hash: hash,
         | 
| 86 | 
            +
                      debug: params[:debug]
         | 
| 87 | 
            +
                    )
         | 
| 75 88 |  | 
| 76 89 | 
             
                    UI.message("Found #{splitted.length} commits since last release")
         | 
| 77 90 | 
             
                    releases = params[:releases]
         | 
| @@ -131,14 +144,17 @@ module Fastlane | |
| 131 144 |  | 
| 132 145 | 
             
                  def self.is_codepush_friendly(params)
         | 
| 133 146 | 
             
                    # Begining of the branch is taken for codepush analysis
         | 
| 134 | 
            -
                    hash = Actions.sh('git rev-list --max-parents=0 HEAD', log:  | 
| 147 | 
            +
                    hash = Actions.sh('git rev-list --max-parents=0 HEAD', log: params[:debug]).chomp
         | 
| 135 148 | 
             
                    next_major = 0
         | 
| 136 149 | 
             
                    next_minor = 0
         | 
| 137 150 | 
             
                    next_patch = 0
         | 
| 138 151 | 
             
                    last_incompatible_codepush_version = '0.0.0'
         | 
| 139 152 |  | 
| 140 153 | 
             
                    # Get commits log between last version and head
         | 
| 141 | 
            -
                    splitted = get_commits_from_hash( | 
| 154 | 
            +
                    splitted = get_commits_from_hash(
         | 
| 155 | 
            +
                      hash: hash,
         | 
| 156 | 
            +
                      debug: params[:debug]
         | 
| 157 | 
            +
                    )
         | 
| 142 158 | 
             
                    releases = params[:releases]
         | 
| 143 159 | 
             
                    codepush_friendly = params[:codepush_friendly]
         | 
| 144 160 |  | 
| @@ -226,6 +242,13 @@ module Fastlane | |
| 226 242 | 
             
                        default_value: [],
         | 
| 227 243 | 
             
                        type: Array,
         | 
| 228 244 | 
             
                        optional: true
         | 
| 245 | 
            +
                      ),
         | 
| 246 | 
            +
                      FastlaneCore::ConfigItem.new(
         | 
| 247 | 
            +
                        key: :debug,
         | 
| 248 | 
            +
                        description: "True if you want to log out a debug info",
         | 
| 249 | 
            +
                        default_value: false,
         | 
| 250 | 
            +
                        type: Boolean,
         | 
| 251 | 
            +
                        optional: true
         | 
| 229 252 | 
             
                      )
         | 
| 230 253 | 
             
                    ]
         | 
| 231 254 | 
             
                  end
         | 
| @@ -8,7 +8,11 @@ module Fastlane | |
| 8 8 |  | 
| 9 9 | 
             
                class ConventionalChangelogAction < Action
         | 
| 10 10 | 
             
                  def self.get_commits_from_hash(params)
         | 
| 11 | 
            -
                    commits = Helper::SemanticReleaseHelper.git_log( | 
| 11 | 
            +
                    commits = Helper::SemanticReleaseHelper.git_log(
         | 
| 12 | 
            +
                      pretty: '%s|%b|%H|%h|%an|%at|>',
         | 
| 13 | 
            +
                      start: params[:hash],
         | 
| 14 | 
            +
                      debug: params[:debug]
         | 
| 15 | 
            +
                    )
         | 
| 12 16 | 
             
                    commits.split("|>")
         | 
| 13 17 | 
             
                  end
         | 
| 14 18 |  | 
| @@ -27,7 +31,10 @@ module Fastlane | |
| 27 31 | 
             
                    version = lane_context[SharedValues::RELEASE_NEXT_VERSION]
         | 
| 28 32 |  | 
| 29 33 | 
             
                    # Get commits log between last version and head
         | 
| 30 | 
            -
                    commits = get_commits_from_hash( | 
| 34 | 
            +
                    commits = get_commits_from_hash(
         | 
| 35 | 
            +
                      hash: last_tag_hash,
         | 
| 36 | 
            +
                      debug: params[:debug]
         | 
| 37 | 
            +
                    )
         | 
| 31 38 | 
             
                    parsed = parse_commits(commits)
         | 
| 32 39 |  | 
| 33 40 | 
             
                    commit_url = params[:commit_url]
         | 
| @@ -263,6 +270,13 @@ module Fastlane | |
| 263 270 | 
             
                        default_value: true,
         | 
| 264 271 | 
             
                        type: Boolean,
         | 
| 265 272 | 
             
                        optional: true
         | 
| 273 | 
            +
                      ),
         | 
| 274 | 
            +
                      FastlaneCore::ConfigItem.new(
         | 
| 275 | 
            +
                        key: :debug,
         | 
| 276 | 
            +
                        description: "True if you want to log out a debug info",
         | 
| 277 | 
            +
                        default_value: false,
         | 
| 278 | 
            +
                        type: Boolean,
         | 
| 279 | 
            +
                        optional: true
         | 
| 266 280 | 
             
                      )
         | 
| 267 281 | 
             
                    ]
         | 
| 268 282 | 
             
                  end
         | 
| @@ -8,9 +8,9 @@ module Fastlane | |
| 8 8 | 
             
                  # class methods that you define here become available in your action
         | 
| 9 9 | 
             
                  # as `Helper::SemanticReleaseHelper.your_method`
         | 
| 10 10 | 
             
                  #
         | 
| 11 | 
            -
                  def self.git_log( | 
| 12 | 
            -
                    command = "git log --pretty='#{pretty}' --reverse #{start}..HEAD"
         | 
| 13 | 
            -
                    Actions.sh(command, log:  | 
| 11 | 
            +
                  def self.git_log(params)
         | 
| 12 | 
            +
                    command = "git log --pretty='#{params[:pretty]}' --reverse #{params[:start]}..HEAD"
         | 
| 13 | 
            +
                    Actions.sh(command, log: params[:debug]).chomp
         | 
| 14 14 | 
             
                  end
         | 
| 15 15 |  | 
| 16 16 | 
             
                  def self.parse_commit(params)
         | 
| @@ -1 +1 @@ | |
| 1 | 
            -
            module Fastlane module SemanticRelease VERSION = "1. | 
| 1 | 
            +
            module Fastlane module SemanticRelease VERSION = "1.9.0" end end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: fastlane-plugin-semantic_release
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1. | 
| 4 | 
            +
              version: 1.9.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Jiří Otáhal
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2020- | 
| 11 | 
            +
            date: 2020-03-02 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: pry
         |