Sha256: 901d01e76ccf414f79f576b67457168534b6ab5c2f0754eb69b00cce7d5c6d01

Contents?: true

Size: 747 Bytes

Versions: 69

Compression:

Stored size: 747 Bytes

Contents

module Fastlane
  module Actions
    class BackupFileAction < Action
      def self.run(params)
        path = params[:path]
        FileUtils.cp(path, "#{path}.back", {preserve: true})
        Helper.log.info "Successfully created a backup 💾"
      end

      def self.description
        'This action backs up your file to "[path].back"'
      end

      def self.is_supported?(platform)
        true
      end

      def self.author
        "gin0606"
      end

      def self.available_options
        [
          FastlaneCore::ConfigItem.new(key: :path,
                                       description: "Path to the file you want to backup",
                                       optional: false)
        ]
      end
    end
  end
end

Version data entries

69 entries across 69 versions & 1 rubygems

Version Path
fastlane-1.66.0 lib/fastlane/actions/backup_file.rb
fastlane-1.65.0 lib/fastlane/actions/backup_file.rb
fastlane-1.64.0 lib/fastlane/actions/backup_file.rb
fastlane-1.63.1 lib/fastlane/actions/backup_file.rb
fastlane-1.63.0 lib/fastlane/actions/backup_file.rb
fastlane-1.62.0 lib/fastlane/actions/backup_file.rb
fastlane-1.61.0 lib/fastlane/actions/backup_file.rb
fastlane-1.60.0 lib/fastlane/actions/backup_file.rb
fastlane-1.59.0 lib/fastlane/actions/backup_file.rb
fastlane-1.58.0 lib/fastlane/actions/backup_file.rb
fastlane-1.57.0 lib/fastlane/actions/backup_file.rb
fastlane-1.56.0 lib/fastlane/actions/backup_file.rb
fastlane-1.55.0 lib/fastlane/actions/backup_file.rb
fastlane-1.54.0 lib/fastlane/actions/backup_file.rb
fastlane-1.53.0 lib/fastlane/actions/backup_file.rb
fastlane-1.52.0 lib/fastlane/actions/backup_file.rb
fastlane-1.51.0 lib/fastlane/actions/backup_file.rb
fastlane-1.50.0 lib/fastlane/actions/backup_file.rb
fastlane-1.49.0 lib/fastlane/actions/backup_file.rb
fastlane-1.48.0 lib/fastlane/actions/backup_file.rb