[1736-maintenance-swiftlint-version-] add new `rake` task: `swift_lin… (#1797)
* [1736-maintenance-swiftlint-version-] add new `rake` task: `swift_lint_update` * [1736-maintenance-swiftlint-version-] add `.swift-lint.version` * [1736-maintenance-swiftlint-version-] update bundler in github's workflows to `2.1.4` * [1736-maintenance-swiftlint-version-] adjust `Rakefile`
This commit is contained in:
parent
5ebe48d97e
commit
020fec1df2
|
@ -28,8 +28,8 @@ jobs:
|
|||
- uses: actions/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: '2.x'
|
||||
- name: Install Bundler 2.0.2
|
||||
run: gem install bundler --version 2.0.2
|
||||
- name: Install Bundler 2.1.4
|
||||
run: gem install bundler --version 2.1.4
|
||||
- name: Install Bundler dependencies
|
||||
run: bundle install
|
||||
- name: Run swiftformat
|
||||
|
@ -44,8 +44,8 @@ jobs:
|
|||
- uses: actions/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: '2.x'
|
||||
- name: Install Bundler 2.0.2
|
||||
run: gem install bundler --version 2.0.2
|
||||
- name: Install Bundler 2.1.4
|
||||
run: gem install bundler --version 2.1.4
|
||||
- name: Install Bundler dependencies
|
||||
run: bundle install
|
||||
- name: Run swiftlint
|
||||
|
|
|
@ -80,8 +80,8 @@ jobs:
|
|||
- uses: actions/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: '2.x'
|
||||
- name: Install Bundler 2.0.2
|
||||
run: gem install bundler --version 2.0.2
|
||||
- name: Install Bundler 2.1.4
|
||||
run: gem install bundler --version 2.1.4
|
||||
- name: Install Bundler dependencies
|
||||
run: bundle install
|
||||
- name: Run tests
|
||||
|
@ -100,8 +100,8 @@ jobs:
|
|||
- uses: actions/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: '2.x'
|
||||
- name: Install Bundler 2.0.2
|
||||
run: gem install bundler --version 2.0.2
|
||||
- name: Install Bundler 2.1.4
|
||||
run: gem install bundler --version 2.1.4
|
||||
- name: Install Bundler dependencies
|
||||
run: bundle install
|
||||
- name: Run tests
|
||||
|
@ -118,8 +118,8 @@ jobs:
|
|||
- uses: actions/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: '2.x'
|
||||
- name: Install Bundler 2.0.2
|
||||
run: gem install bundler --version 2.0.2
|
||||
- name: Install Bundler 2.1.4
|
||||
run: gem install bundler --version 2.1.4
|
||||
- name: Install Bundler dependencies
|
||||
run: bundle install
|
||||
- name: Package build and upload it to GCS
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
1.0.0-beta.4
|
2
Gemfile
2
Gemfile
|
@ -14,4 +14,4 @@ gem "colorize", "~> 0.8.1"
|
|||
gem "cocoapods", "~> 1.9"
|
||||
gem "xcodeproj", "~> 1.18"
|
||||
gem "highline", "~> 2.0"
|
||||
gem "zip", "~> 2.0.2"
|
||||
gem "rubyzip", "~> 2.3.0"
|
||||
|
|
|
@ -183,6 +183,7 @@ GEM
|
|||
parser (>= 2.7.1.4)
|
||||
ruby-macho (1.4.0)
|
||||
ruby-progressbar (1.10.1)
|
||||
rubyzip (2.3.0)
|
||||
signet (0.14.0)
|
||||
addressable (~> 2.3)
|
||||
faraday (>= 0.17.3, < 2.0)
|
||||
|
@ -207,7 +208,6 @@ GEM
|
|||
claide (>= 1.0.2, < 2.0)
|
||||
colored2 (~> 3.1)
|
||||
nanaimo (~> 0.3.0)
|
||||
zip (2.0.2)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
@ -223,9 +223,9 @@ DEPENDENCIES
|
|||
minitest (~> 5.14)
|
||||
rake (~> 13.0)
|
||||
rubocop (~> 0.91.0)
|
||||
rubyzip (~> 2.3.0)
|
||||
simctl (~> 1.6)
|
||||
xcodeproj (~> 1.18)
|
||||
zip (~> 2.0.2)
|
||||
|
||||
BUNDLED WITH
|
||||
2.1.2
|
||||
2.1.4
|
||||
|
|
18
Rakefile
18
Rakefile
|
@ -1,6 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
SWIFTDOC_VERSION = "1.0.0-beta.4".freeze
|
||||
SWIFTLINT_VERSION = "0.40.2".freeze
|
||||
|
||||
require 'rubygems'
|
||||
require 'cucumber'
|
||||
|
@ -21,7 +22,7 @@ end
|
|||
|
||||
desc("Updates swift-doc binary with the latest version available.")
|
||||
task :swift_doc_update do
|
||||
root_dir = Dir.pwd.strip
|
||||
root_dir = File.expand_path(__dir__)
|
||||
Dir.mktmpdir do |temporary_dir|
|
||||
Dir.chdir(temporary_dir) do
|
||||
system("curl", "-LO", "https://github.com/SwiftDocOrg/swift-doc/archive/#{SWIFTDOC_VERSION}.zip")
|
||||
|
@ -32,7 +33,20 @@ task :swift_doc_update do
|
|||
system("cp", "swift-doc/swift-doc-#{SWIFTDOC_VERSION}/.build/release/swift-doc", "#{root_dir}/vendor/swift-doc")
|
||||
end
|
||||
end
|
||||
system("rm .swift-doc.version && echo \"#{SWIFTDOC_VERSION}\" >> .swift-doc.version")
|
||||
File.write(File.join(root_dir, "vendor/.swiftdoc.version"), SWIFTDOC_VERSION)
|
||||
end
|
||||
|
||||
desc("Updates swift-lint binary with the latest version available.")
|
||||
task :swift_lint_update do
|
||||
root_dir = File.expand_path(__dir__)
|
||||
Dir.mktmpdir do |temporary_dir|
|
||||
Dir.chdir(temporary_dir) do
|
||||
system("curl", "-LO", "https://github.com/realm/SwiftLint/releases/download/#{SWIFTLINT_VERSION}/portable_swiftlint.zip")
|
||||
extract_zip("portable_swiftlint.zip", "portable_swiftlint")
|
||||
system("cp", "portable_swiftlint/swiftlint", "#{root_dir}/vendor/swiftlint")
|
||||
end
|
||||
end
|
||||
File.write(File.join(root_dir, "vendor/.swiftlint.version"), SWIFTLINT_VERSION)
|
||||
end
|
||||
|
||||
desc("Formats the code style")
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
1.0.0-beta.4
|
|
@ -0,0 +1 @@
|
|||
0.40.2
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue