def bump_ipa(sftp, local, appcode)
      remote = get_remote_ipa_path(local, appcode)
      FastlaneCore::UI.message('Checking remote IPA')
      begin
        sftp.stat!(remote) do |response|
          if response.ok?
            begin
              sftp.rename!(remote, remote + '.bak')
            rescue
              begin
                sftp.remove(remote + '.bak') # may fail if not existent
                FastlaneCore::UI.message('Removed ' + remote + '.bak')
              rescue
                sftp.rename!(remote, remote + '.bak')
                FastlaneCore::UI.message('Bumped to ' + remote + '.bak')
              end
            end
          end
        end
      rescue
        FastlaneCore::UI.message('No previous IPA found.')
      end
    end
def bump_ipa(sftp, local, appcode)
      remote = get_remote_ipa_path(local, appcode)
      FastlaneCore::UI.message('Checking remote IPA')
      begin
        sftp.stat!(remote) do |response|
          if response.ok?
            begin
              sftp.rename!(remote, remote + '.bak')
            rescue
              begin
                sftp.remove(remote + '.bak') # may fail if not existent
                FastlaneCore::UI.message('Removed ' + remote + '.bak')
              rescue
                sftp.rename!(remote, remote + '.bak')
                FastlaneCore::UI.message('Bumped to ' + remote + '.bak')
              end
            end
          end
        end
      rescue
        FastlaneCore::UI.message('No previous IPA found.')
      end
    end
Checks/renames remote IPA

 @params sftp
 @params [String] local_ipa_path