Sha256: 87db4cd965f3b5dbe848a5d738263c9deb65b3ab6ce04fd9eb549edd466ed531
Contents?: true
Size: 841 Bytes
Versions: 11
Compression:
Stored size: 841 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')) SCRIPT_PATH = File.expand_path(File.join(File.dirname(__FILE__))) SWIFTLINT_MD5_HASH = DangerSwiftlint::SWIFTLINT_HASH puts "Downloading swiftlint@#{VERSION}" sh "#{SCRIPT_PATH}/downloadSwiftlint.sh -u #{URL} -d #{DESTINATION} -a #{ASSET} -dh #{SWIFTLINT_MD5_HASH}" end end task default: 'swiftlint:install'
Version data entries
11 entries across 11 versions & 1 rubygems