Skip to content

Commit

Permalink
namespace commands
Browse files Browse the repository at this point in the history
  • Loading branch information
djbe committed Feb 19, 2017
1 parent 4ee70bf commit 782c800
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,33 @@ 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'
task :lint do
plain("pod lib lint StencilSwiftKit.podspec --quick", "lint")
end

task :default => :xcode_test
task :default => "xcode:test"

0 comments on commit 782c800

Please sign in to comment.