fastlane-plugin-stream_actions 0.1.15 → 0.1.17
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/stream_actions/actions/pod_push_safely.rb +46 -0
- data/lib/fastlane/plugin/stream_actions/actions/release_ios_sdk.rb +1 -11
- data/lib/fastlane/plugin/stream_actions/actions/touch_changelog.rb +15 -27
- data/lib/fastlane/plugin/stream_actions/version.rb +1 -1
- metadata +3 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 1e09a263ddb2f9ee18214a8076d11ec1a455147f19a960d4a0d73259028d7f7c
         | 
| 4 | 
            +
              data.tar.gz: 1f6bbd93c2c912b7c4978fcccb004ee927c59f8c59f67d977d22a6ea0ac2082f
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 87878e73b99f8607854939d954fdaafe52322a5536c3ba972950a8b811be409c055c642106aa4a4a4787082d0c44a4687de736425ebcc8b40e9e52e050aee05c
         | 
| 7 | 
            +
              data.tar.gz: 8fa6b9690bda755495b4425d126190f79c39f8812d1aa91b0932aa3f7e63710cbd5204a2aba2cf52d58c30117b4b7aad0fa9e7e4d75b0726e844aad280b66fe0
         | 
| @@ -0,0 +1,46 @@ | |
| 1 | 
            +
            module Fastlane
         | 
| 2 | 
            +
              module Actions
         | 
| 3 | 
            +
                class PodPushSafelyAction < Action
         | 
| 4 | 
            +
                  def self.run(params)
         | 
| 5 | 
            +
                    pod_push_safely(params)
         | 
| 6 | 
            +
                  end
         | 
| 7 | 
            +
             | 
| 8 | 
            +
                  def self.pod_push_safely(params)
         | 
| 9 | 
            +
                    UI.message("Starting to push podspec: #{params[:podspec]}")
         | 
| 10 | 
            +
                    other_action.pod_push(path: params[:podspec], allow_warnings: true, synchronous: params[:sync])
         | 
| 11 | 
            +
                  rescue StandardError => e
         | 
| 12 | 
            +
                    UI.message(e)
         | 
| 13 | 
            +
                    UI.message("pod_push failed for #{params[:podspec]}. Waiting a minute until retry for trunk to get updated...")
         | 
| 14 | 
            +
                    sleep(60) # sleep for a minute, wait until trunk gets updates
         | 
| 15 | 
            +
                    pod_push_safely(params)
         | 
| 16 | 
            +
                  end
         | 
| 17 | 
            +
             | 
| 18 | 
            +
                  #####################################################
         | 
| 19 | 
            +
                  # @!group Documentation
         | 
| 20 | 
            +
                  #####################################################
         | 
| 21 | 
            +
             | 
| 22 | 
            +
                  def self.description
         | 
| 23 | 
            +
                    'Safely push a Podspec to Trunk or a private repository'
         | 
| 24 | 
            +
                  end
         | 
| 25 | 
            +
             | 
| 26 | 
            +
                  def self.available_options
         | 
| 27 | 
            +
                    [
         | 
| 28 | 
            +
                      FastlaneCore::ConfigItem.new(
         | 
| 29 | 
            +
                        key: :podspec,
         | 
| 30 | 
            +
                        description: 'The Podspec you want to push'
         | 
| 31 | 
            +
                      ),
         | 
| 32 | 
            +
                      FastlaneCore::ConfigItem.new(
         | 
| 33 | 
            +
                        key: :sync,
         | 
| 34 | 
            +
                        description: 'If validation depends on other recently pushed pods, synchronize',
         | 
| 35 | 
            +
                        is_string: false,
         | 
| 36 | 
            +
                        default_value: false
         | 
| 37 | 
            +
                      )
         | 
| 38 | 
            +
                    ]
         | 
| 39 | 
            +
                  end
         | 
| 40 | 
            +
             | 
| 41 | 
            +
                  def self.supported?(_platform)
         | 
| 42 | 
            +
                    [:ios].include?(platform)
         | 
| 43 | 
            +
                  end
         | 
| 44 | 
            +
                end
         | 
| 45 | 
            +
              end
         | 
| 46 | 
            +
            end
         | 
| @@ -37,7 +37,7 @@ module Fastlane | |
| 37 37 | 
             
                      commitish: ENV['BRANCH_NAME'] || other_action.git_branch
         | 
| 38 38 | 
             
                    )
         | 
| 39 39 |  | 
| 40 | 
            -
                    podspecs.each { |podspec| pod_push_safely(podspec: podspec, sync: params[:pod_sync] & true) }
         | 
| 40 | 
            +
                    podspecs.each { |podspec| other_action.pod_push_safely(podspec: podspec, sync: params[:pod_sync] & true) }
         | 
| 41 41 |  | 
| 42 42 | 
             
                    UI.success("Github release v#{version_number} was created, please visit #{release_details['html_url']} to see it! 🚢")
         | 
| 43 43 | 
             
                  end
         | 
| @@ -69,16 +69,6 @@ module Fastlane | |
| 69 69 | 
             
                    other_action.push_to_git_remote(tags: true)
         | 
| 70 70 | 
             
                  end
         | 
| 71 71 |  | 
| 72 | 
            -
                  def self.pod_push_safely(params)
         | 
| 73 | 
            -
                    UI.message("Starting to push podspec: #{params[:podspec]}")
         | 
| 74 | 
            -
                    other_action.pod_push(path: params[:podspec], allow_warnings: true, synchronous: params[:sync])
         | 
| 75 | 
            -
                  rescue StandardError => e
         | 
| 76 | 
            -
                    UI.message(e)
         | 
| 77 | 
            -
                    UI.message("pod_push failed for #{params[:podspec]}. Waiting a minute until retry for trunk to get updated...")
         | 
| 78 | 
            -
                    sleep(60) # sleep for a minute, wait until trunk gets updates
         | 
| 79 | 
            -
                    pod_push_safely(params)
         | 
| 80 | 
            -
                  end
         | 
| 81 | 
            -
             | 
| 82 72 | 
             
                  #####################################################
         | 
| 83 73 | 
             
                  # @!group Documentation
         | 
| 84 74 | 
             
                  #####################################################
         | 
| @@ -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.17
         | 
| 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-07 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: bundler
         | 
| @@ -230,6 +230,7 @@ files: | |
| 230 230 | 
             
            - lib/fastlane/plugin/stream_actions.rb
         | 
| 231 231 | 
             
            - lib/fastlane/plugin/stream_actions/actions/custom_match.rb
         | 
| 232 232 | 
             
            - lib/fastlane/plugin/stream_actions/actions/is_check_required.rb
         | 
| 233 | 
            +
            - lib/fastlane/plugin/stream_actions/actions/pod_push_safely.rb
         | 
| 233 234 | 
             
            - lib/fastlane/plugin/stream_actions/actions/read_changelog.rb
         | 
| 234 235 | 
             
            - lib/fastlane/plugin/stream_actions/actions/release_ios_sdk.rb
         | 
| 235 236 | 
             
            - lib/fastlane/plugin/stream_actions/actions/retrieve_xctest_names.rb
         |