From 782c800c14d560ad56faa593b924cf86ea09c67b Mon Sep 17 00:00:00 2001 From: David Jennes Date: Sun, 19 Feb 2017 23:44:00 +0100 Subject: [PATCH] namespace commands --- Rakefile | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/Rakefile b/Rakefile index 6cc7654b..35531aba 100644 --- a/Rakefile +++ b/Rakefile @@ -16,22 +16,28 @@ def plain(cmd, name) end end -task :spm_build do - plain("swift build", "spm_build") -end +namespace :spm do + desc 'Build using SPM' + task :build do + plain("swift build", "spm_build") + end -task :xcode_build do - xcpretty("xcodebuild -workspace StencilSwiftKit.xcworkspace -scheme Tests build-for-testing", "xcode_build") + desc 'Run SPM Unit Tests' + task :test => :build do + plain("swift test", "spm_build") + end end -desc 'Run Xcode Unit Tests' -task :xcode_test => :xcode_build do - xcpretty("xcodebuild -workspace StencilSwiftKit.xcworkspace -scheme Tests test-without-building", "xcode_test") -end +namespace :xcode do + desc 'Build using Xcode' + task :build do + xcpretty("xcodebuild -workspace StencilSwiftKit.xcworkspace -scheme Tests build-for-testing", "xcode_build") + end -desc 'Run SPM Unit Tests' -task :spm_test => :spm_build do - plain("swift test", "spm_build") + desc 'Run Xcode Unit Tests' + task :test => :build do + xcpretty("xcodebuild -workspace StencilSwiftKit.xcworkspace -scheme Tests test-without-building", "xcode_test") + end end desc 'Lint the Pod' @@ -39,4 +45,4 @@ task :lint do plain("pod lib lint StencilSwiftKit.podspec --quick", "lint") end -task :default => :xcode_test +task :default => "xcode:test"