class Fastlane::Actions::ZipAction

Public Class Methods

authors() click to toggle source
# File fastlane/lib/fastlane/actions/zip.rb, line 176
def self.authors
  ["KrauseFx"]
end
available_options() click to toggle source
# File fastlane/lib/fastlane/actions/zip.rb, line 84
def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :path,
                                 env_name: "FL_ZIP_PATH",
                                 description: "Path to the directory or file to be zipped",
                                 verify_block: proc do |value|
                                   path = File.expand_path(value)
                                   UI.user_error!("Couldn't find file/folder at path '#{path}'") unless File.exist?(path)
                                 end),
    FastlaneCore::ConfigItem.new(key: :output_path,
                                 env_name: "FL_ZIP_OUTPUT_NAME",
                                 description: "The name of the resulting zip file",
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :verbose,
                                 env_name: "FL_ZIP_VERBOSE",
                                 description: "Enable verbose output of zipped file",
                                 default_value: true,
                                 type: Boolean,
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :password,
                                 env_name: "FL_ZIP_PASSWORD",
                                 description: "Encrypt the contents of the zip archive using a password",
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :symlinks,
                                 env_name: "FL_ZIP_SYMLINKS",
                                 description: "Store symbolic links as such in the zip archive",
                                 optional: true,
                                 type: Boolean,
                                 default_value: false),
    FastlaneCore::ConfigItem.new(key: :include,
                                 env_name: "FL_ZIP_INCLUDE",
                                 description: "Array of paths or patterns to include",
                                 optional: true,
                                 type: Array,
                                 default_value: []),
    FastlaneCore::ConfigItem.new(key: :exclude,
                                 env_name: "FL_ZIP_EXCLUDE",
                                 description: "Array of paths or patterns to exclude",
                                 optional: true,
                                 type: Array,
                                 default_value: [])
  ]
end
category() click to toggle source
# File fastlane/lib/fastlane/actions/zip.rb, line 160
def self.category
  :misc
end
description() click to toggle source

@!group Documentation

# File fastlane/lib/fastlane/actions/zip.rb, line 80
def self.description
  "Compress a file or folder to a zip"
end
example_code() click to toggle source
# File fastlane/lib/fastlane/actions/zip.rb, line 128
def self.example_code
  [
    'zip',
    'zip(
      path: "MyApp.app",
      output_path: "Latest.app.zip"
    )',
    'zip(
      path: "MyApp.app",
      output_path: "Latest.app.zip",
      verbose: false
    )',
    'zip(
      path: "MyApp.app",
      output_path: "Latest.app.zip",
      verbose: false,
      symlinks: true
    )',
    'zip(
      path: "./",
      output_path: "Source Code.zip",
      exclude: [".git/*"]
    )',
    'zip(
      path: "./",
      output_path: "Swift Code.zip",
      include: ["**/*.swift"],
      exclude: ["Package.swift", "vendor/*", "Pods/*"]
    )'
  ]
end
is_supported?(platform) click to toggle source
# File fastlane/lib/fastlane/actions/zip.rb, line 180
def self.is_supported?(platform)
  true
end
output() click to toggle source
# File fastlane/lib/fastlane/actions/zip.rb, line 164
def self.output
  []
end
return_type() click to toggle source
# File fastlane/lib/fastlane/actions/zip.rb, line 172
def self.return_type
  :string
end
return_value() click to toggle source
# File fastlane/lib/fastlane/actions/zip.rb, line 168
def self.return_value
  "The path to the output zip file"
end
run(params) click to toggle source
# File fastlane/lib/fastlane/actions/zip.rb, line 72
def self.run(params)
  Runner.new(params).run
end