Sha256: 12546d1e4a2bedf9fb97fc7e815c9b10d7703916e36a8f6eca949befa59b419f
Contents?: true
Size: 772 Bytes
Versions: 17
Compression:
Stored size: 772 Bytes
Contents
# frozen_string_literal: true require_relative '../../lib/version' namespace :swiftlint do desc 'Download and install swiftlint tool' task :install do next if ENV['DANGER_SKIP_SWIFTLINT_INSTALL'] == 'YES' REPO = 'https://github.com/realm/SwiftLint' VERSION = ENV['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
17 entries across 17 versions & 1 rubygems