From 8b9cde93c8bf29a7440745e038e4a6f59ab06053 Mon Sep 17 00:00:00 2001 From: Tyler Miller Date: Mon, 12 Mar 2018 15:37:11 -0400 Subject: [PATCH] Add Danger (#466) --- .travis.yml | 3 +++ Dangerfile | 5 +++++ Gemfile | 2 ++ Gemfile.lock | 37 +++++++++++++++++++++++++++++++++++++ 4 files changed, 47 insertions(+) create mode 100644 Dangerfile diff --git a/.travis.yml b/.travis.yml index 0ae4103add..02918d2893 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,9 @@ before_install: - brew update - brew install swiftlint || true +before_script: + - bundle exec danger + script: - set -o pipefail - fastlane tests diff --git a/Dangerfile b/Dangerfile new file mode 100644 index 0000000000..f4867118ad --- /dev/null +++ b/Dangerfile @@ -0,0 +1,5 @@ +# Make it more obvious that a PR is a work in progress and shouldn't be merged yet +warn("PR is classed as Work in Progress") if github.pr_title.include? "[WIP]" + +# swiftlint +swiftlint.lint_files diff --git a/Gemfile b/Gemfile index e4b5be5c36..01ecd1ba6f 100644 --- a/Gemfile +++ b/Gemfile @@ -6,6 +6,8 @@ source "https://rubygems.org" gem 'fastlane' gem 'cocoapods' +gem 'danger' +gem 'danger-swiftlint' plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') eval_gemfile(plugins_path) if File.exist?(plugins_path) diff --git a/Gemfile.lock b/Gemfile.lock index 97a05abf40..49188f5694 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,6 +11,10 @@ GEM public_suffix (>= 2.0.2, < 4.0) babosa (1.0.2) claide (1.0.2) + claide-plugins (0.9.2) + cork + nap + open4 (~> 1.3) cocoapods (1.3.1) activesupport (>= 4.0.2, < 5) claide (>= 1.0.2, < 2.0) @@ -49,6 +53,24 @@ GEM commander-fastlane (4.4.5) highline (~> 1.7.2) concurrent-ruby (1.0.5) + cork (0.3.0) + colored2 (~> 3.1) + danger (5.5.11) + claide (~> 1.0) + claide-plugins (>= 0.9.2) + colored2 (~> 3.1) + cork (~> 0.1) + faraday (~> 0.9) + faraday-http-cache (~> 1.0) + git (~> 1) + kramdown (~> 1.5) + no_proxy_fix + octokit (~> 4.7) + terminal-table (~> 1) + danger-swiftlint (0.13.1) + danger + rake (> 10) + thor (~> 0.19) declarative (0.0.10) declarative-option (0.1.0) domain_name (0.5.20170404) @@ -61,6 +83,8 @@ GEM faraday-cookie_jar (0.0.6) faraday (>= 0.7.4) http-cookie (~> 1.0.0) + faraday-http-cache (1.3.1) + faraday (~> 0.8) faraday_middleware (0.12.2) faraday (>= 0.7.4, < 1.0) fastimage (2.1.1) @@ -100,6 +124,7 @@ GEM fourflusher (2.0.1) fuzzy_match (2.0.4) gh_inspector (1.0.3) + git (1.3.0) google-api-client (0.13.6) addressable (~> 2.5, >= 2.5.1) googleauth (~> 0.5) @@ -123,6 +148,7 @@ GEM concurrent-ruby (~> 1.0) json (2.1.0) jwt (2.1.0) + kramdown (1.16.2) little-plugger (1.1.4) logging (2.2.2) little-plugger (~> 1.1) @@ -140,9 +166,14 @@ GEM nanaimo (0.2.3) nap (1.1.0) netrc (0.11.0) + no_proxy_fix (0.1.2) + octokit (4.8.0) + sawyer (~> 0.8.0, >= 0.5.3) + open4 (1.3.4) os (0.9.6) plist (3.4.0) public_suffix (2.0.5) + rake (12.3.0) representable (3.0.4) declarative (< 0.1.0) declarative-option (< 0.2.0) @@ -151,6 +182,9 @@ GEM rouge (2.0.7) ruby-macho (1.1.0) rubyzip (1.2.1) + sawyer (0.8.1) + addressable (>= 2.3.5, < 2.6) + faraday (~> 0.8, < 1.0) security (0.1.3) signet (0.8.1) addressable (~> 2.3) @@ -161,6 +195,7 @@ GEM terminal-notifier (1.8.0) terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) + thor (0.20.0) thread_safe (0.3.6) tty-screen (0.6.3) tzinfo (1.2.4) @@ -186,6 +221,8 @@ PLATFORMS DEPENDENCIES cocoapods + danger + danger-swiftlint fastlane BUNDLED WITH