Sha256: 65bc6d79cd30201abda73c525f2144abd0e20700fb91e3a0193ad21efd5d634e

Contents?: true

Size: 652 Bytes

Versions: 5

Compression:

Stored size: 652 Bytes

Contents

require_relative '../../lib/version'

namespace :swiftlint do

  desc "Download and install swiftlint tool"
  task :install do
    REPO = "https://github.com/realm/SwiftLint"
    VERSION = DangerSwiftlint::SWIFTLINT_VERSION
    ASSET = "portable_swiftlint.zip"
    URL = "#{REPO}/releases/download/#{VERSION}/#{ASSET}"
    DESTINATION = File.expand_path(File.join(File.dirname(__FILE__), 'bin'))

    puts "Downloading swiftlint@#{VERSION}"
    sh [
      "mkdir -p #{DESTINATION}",
      "curl -s -L #{URL} -o #{ASSET}",
      "unzip -q #{ASSET} -d #{DESTINATION}",
      "rm #{ASSET}"
    ].join(" && ")
  end

end

task default: 'swiftlint:install'

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
danger-swiftlint-0.6.0 ext/swiftlint/Rakefile
danger-swiftlint-0.5.1 ext/swiftlint/Rakefile
danger-swiftlint-0.5.0 ext/swiftlint/Rakefile
danger-swiftlint-0.4.1 ext/swiftlint/Rakefile
danger-swiftlint-0.4.0 ext/swiftlint/Rakefile